{
  "openapi": "3.1.0",
  "info": {
    "title": "Neatlogs Public API",
    "version": "0.1.0",
    "description": "Filtered public API specification for customer-facing /api/v1/public/* endpoints only."
  },
  "servers": [
    {
      "url": "https://app.neatlogs.com"
    }
  ],
  "tags": [
    {
      "name": "access"
    },
    {
      "name": "account"
    },
    {
      "name": "actions"
    },
    {
      "name": "alerts"
    },
    {
      "name": "analytics"
    },
    {
      "name": "api-keys"
    },
    {
      "name": "audit"
    },
    {
      "name": "batches"
    },
    {
      "name": "billing"
    },
    {
      "name": "bindings"
    },
    {
      "name": "classifiers"
    },
    {
      "name": "coding-tools"
    },
    {
      "name": "comments"
    },
    {
      "name": "configuration"
    },
    {
      "name": "context"
    },
    {
      "name": "credential-migrations"
    },
    {
      "name": "credentials"
    },
    {
      "name": "datasets"
    },
    {
      "name": "deletion"
    },
    {
      "name": "detections"
    },
    {
      "name": "discovery"
    },
    {
      "name": "evaluations"
    },
    {
      "name": "evaluators"
    },
    {
      "name": "experiments"
    },
    {
      "name": "export"
    },
    {
      "name": "feedback"
    },
    {
      "name": "guest-review"
    },
    {
      "name": "imports"
    },
    {
      "name": "incidents"
    },
    {
      "name": "ingest-credentials"
    },
    {
      "name": "integrations"
    },
    {
      "name": "invitations"
    },
    {
      "name": "issues"
    },
    {
      "name": "mcp"
    },
    {
      "name": "members"
    },
    {
      "name": "notifications"
    },
    {
      "name": "oauth"
    },
    {
      "name": "organizations"
    },
    {
      "name": "projects"
    },
    {
      "name": "prompts"
    },
    {
      "name": "public"
    },
    {
      "name": "roles"
    },
    {
      "name": "runs"
    },
    {
      "name": "saved-filters"
    },
    {
      "name": "search"
    },
    {
      "name": "service-accounts"
    },
    {
      "name": "sessions"
    },
    {
      "name": "sharing"
    },
    {
      "name": "skills"
    },
    {
      "name": "spans"
    },
    {
      "name": "suggestions"
    },
    {
      "name": "tokens"
    },
    {
      "name": "traces"
    },
    {
      "name": "webhooks"
    }
  ],
  "components": {
    "headers": {
      "PublicApiLegacyRateLimitLimit": {
        "description": "Effective request ceiling for the current window",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "PublicApiLegacyRateLimitRemaining": {
        "description": "Requests remaining in the current window",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "PublicApiRateLimitDegraded": {
        "description": "Whether bounded emergency enforcement is active",
        "schema": {
          "enum": [
            "true",
            "false"
          ],
          "type": "string"
        }
      },
      "PublicApiRateLimitLimit": {
        "description": "Effective request ceiling for the current window",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "PublicApiRateLimitPolicy": {
        "description": "Applied pre-authentication or authenticated rate class",
        "schema": {
          "type": "string"
        }
      },
      "PublicApiRateLimitRemaining": {
        "description": "Requests remaining in the current window",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "PublicApiRateLimitReset": {
        "description": "Unix timestamp in seconds when the current window resets",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "PublicApiRateLimitResetAfter": {
        "description": "Whole seconds until the current window resets",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "PublicApiRateLimitVersion": {
        "description": "NeatLogs rate-limit contract version",
        "schema": {
          "const": "1",
          "type": "string"
        }
      },
      "PublicApiRequestId": {
        "description": "Server-owned request correlation identifier",
        "schema": {
          "pattern": "^req_[a-f0-9]{32}$",
          "type": "string"
        }
      },
      "PublicApiRetryAfter": {
        "description": "Whole seconds until the client should retry",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "PublicApiWwwAuthenticate": {
        "description": "Bearer authentication challenge",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "PublicApiProblem": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 96,
            "pattern": "^[A-Z][A-Z0-9_]*$"
          },
          "detail": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "details": {
            "type": "object",
            "properties": {
              "runId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "state": {
                "type": "string",
                "enum": [
                  "queued",
                  "running",
                  "completed",
                  "partial",
                  "failed",
                  "cancelled",
                  "timed_out"
                ]
              },
              "attempt": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              }
            },
            "required": [
              "runId",
              "state",
              "attempt"
            ],
            "additionalProperties": false
          },
          "errors": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "maxLength": 64,
                  "pattern": "^[a-z0-9_]+$"
                },
                "message": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "path": {
                  "type": "string",
                  "maxLength": 160
                }
              },
              "required": [
                "code",
                "message",
                "path"
              ],
              "additionalProperties": false
            }
          },
          "instance": {
            "type": "string",
            "maxLength": 2048,
            "pattern": "^\\/[aA][pP][iI]\\/[vV][0-9]+\\/[pP][uU][bB][lL][iI][cC](?:\\/[^?#\\r\\n]*)?$"
          },
          "requestId": {
            "type": "string",
            "pattern": "^req_[a-f0-9]{32}$"
          },
          "retryable": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              400,
              401,
              403,
              404,
              409,
              413,
              415,
              422,
              429,
              500,
              503
            ],
            "type": "integer"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "type": {
            "type": "string",
            "pattern": "^urn:neatlogs:problem:[a-z0-9]+(?:-[a-z0-9]+)*$"
          }
        },
        "required": [
          "code",
          "detail",
          "instance",
          "requestId",
          "retryable",
          "status",
          "title",
          "type"
        ],
        "additionalProperties": false
      },
      "PublicApiProblem400": {
        "properties": {
          "status": {
            "const": 400,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem401": {
        "properties": {
          "status": {
            "const": 401,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem403": {
        "properties": {
          "status": {
            "const": 403,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem404": {
        "properties": {
          "status": {
            "const": 404,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem409": {
        "properties": {
          "status": {
            "const": 409,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem413": {
        "properties": {
          "status": {
            "const": 413,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem415": {
        "properties": {
          "status": {
            "const": 415,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem422": {
        "properties": {
          "status": {
            "const": 422,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem429": {
        "properties": {
          "status": {
            "const": 429,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem500": {
        "properties": {
          "status": {
            "const": 500,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblem503": {
        "properties": {
          "status": {
            "const": 503,
            "type": "number"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PublicApiProblemResponse401": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicApiProblem"
          },
          {
            "$ref": "#/components/schemas/PublicApiProblem401"
          }
        ]
      },
      "PublicApiProblemResponse403": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicApiProblem"
          },
          {
            "$ref": "#/components/schemas/PublicApiProblem403"
          }
        ]
      },
      "PublicApiProblemResponse404": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicApiProblem"
          },
          {
            "$ref": "#/components/schemas/PublicApiProblem404"
          }
        ]
      },
      "PublicApiProblemResponse409": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicApiProblem"
          },
          {
            "$ref": "#/components/schemas/PublicApiProblem409"
          }
        ]
      },
      "PublicApiProblemResponse413": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicApiProblem"
          },
          {
            "$ref": "#/components/schemas/PublicApiProblem413"
          }
        ]
      },
      "PublicApiProblemResponse415": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicApiProblem"
          },
          {
            "$ref": "#/components/schemas/PublicApiProblem415"
          }
        ]
      },
      "PublicApiProblemResponse429": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicApiProblem"
          },
          {
            "$ref": "#/components/schemas/PublicApiProblem429"
          }
        ]
      },
      "PublicApiProblemResponse500": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicApiProblem"
          },
          {
            "$ref": "#/components/schemas/PublicApiProblem500"
          }
        ]
      },
      "PublicDetectionCodeConfigInput": {
        "type": "object",
        "properties": {
          "entrypoint": {
            "type": "string",
            "const": "detect"
          },
          "input_schema": {
            "type": "string",
            "enum": [
              "span.v1",
              "trace.v1",
              "session.v1"
            ]
          },
          "language": {
            "type": "string",
            "enum": [
              "python",
              "javascript"
            ]
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          },
          "required_evidence": {
            "default": [],
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "target": {
            "type": "string",
            "enum": [
              "span",
              "trace",
              "session"
            ]
          }
        },
        "required": [
          "language",
          "source",
          "target"
        ],
        "additionalProperties": false
      },
      "PublicDetectionCodeConfigOutput": {
        "type": "object",
        "properties": {
          "entrypoint": {
            "type": "string",
            "const": "detect"
          },
          "input_schema": {
            "type": "string",
            "enum": [
              "span.v1",
              "trace.v1",
              "session.v1"
            ]
          },
          "language": {
            "type": "string",
            "enum": [
              "python",
              "javascript"
            ]
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          },
          "required_evidence": {
            "default": [],
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "target": {
            "type": "string",
            "enum": [
              "span",
              "trace",
              "session"
            ]
          }
        },
        "required": [
          "language",
          "source",
          "required_evidence",
          "target"
        ],
        "additionalProperties": false
      },
      "PublicDetectionCodeMutationConfigInput": {
        "type": "object",
        "properties": {
          "entrypoint": {
            "type": "string",
            "const": "detect"
          },
          "input_schema": {
            "type": "string",
            "enum": [
              "span.v1",
              "trace.v1",
              "session.v1"
            ]
          },
          "language": {
            "type": "string",
            "enum": [
              "python",
              "javascript"
            ]
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          },
          "required_evidence": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "target": {
            "type": "string",
            "enum": [
              "span",
              "trace",
              "session"
            ]
          }
        },
        "required": [
          "language",
          "source",
          "target"
        ],
        "additionalProperties": false
      },
      "PublicDetectionConditionalConfigOutput": {
        "type": "object",
        "properties": {
          "conditions": {
            "anyOf": [
              {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "=",
                        "!=",
                        ">",
                        "<",
                        ">=",
                        "<=",
                        "contains",
                        "not_contains",
                        "in",
                        "not_in",
                        "is_empty",
                        "is_not_empty"
                      ]
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 32768
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        },
                        {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 32768
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "field",
                    "operator"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "logic": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "AND",
                  "OR"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "root": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "children": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "operator": {
                              "type": "string",
                              "enum": [
                                "=",
                                "!=",
                                ">",
                                "<",
                                ">=",
                                "<=",
                                "contains",
                                "not_contains",
                                "in",
                                "not_in",
                                "is_empty",
                                "is_not_empty"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "rule"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 32768
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                },
                                {
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 32768
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      }
                                    ]
                                  }
                                }
                              ]
                            }
                          },
                          "required": [
                            "field",
                            "operator",
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "children": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "field": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 512
                                      },
                                      "operator": {
                                        "type": "string",
                                        "enum": [
                                          "=",
                                          "!=",
                                          ">",
                                          "<",
                                          ">=",
                                          "<=",
                                          "contains",
                                          "not_contains",
                                          "in",
                                          "not_in",
                                          "is_empty",
                                          "is_not_empty"
                                        ]
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "rule"
                                      },
                                      "value": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "maxLength": 32768
                                          },
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "boolean"
                                          },
                                          {
                                            "type": "null"
                                          },
                                          {
                                            "maxItems": 100,
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "maxLength": 32768
                                                },
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "boolean"
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "field",
                                      "operator",
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "children": {
                                        "minItems": 1,
                                        "maxItems": 100,
                                        "type": "array",
                                        "items": {
                                          "anyOf": [
                                            {
                                              "type": "object",
                                              "properties": {
                                                "field": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 512
                                                },
                                                "operator": {
                                                  "type": "string",
                                                  "enum": [
                                                    "=",
                                                    "!=",
                                                    ">",
                                                    "<",
                                                    ">=",
                                                    "<=",
                                                    "contains",
                                                    "not_contains",
                                                    "in",
                                                    "not_in",
                                                    "is_empty",
                                                    "is_not_empty"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "const": "rule"
                                                },
                                                "value": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string",
                                                      "maxLength": 32768
                                                    },
                                                    {
                                                      "type": "number"
                                                    },
                                                    {
                                                      "type": "boolean"
                                                    },
                                                    {
                                                      "type": "null"
                                                    },
                                                    {
                                                      "maxItems": 100,
                                                      "type": "array",
                                                      "items": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string",
                                                            "maxLength": 32768
                                                          },
                                                          {
                                                            "type": "number"
                                                          },
                                                          {
                                                            "type": "boolean"
                                                          }
                                                        ]
                                                      }
                                                    }
                                                  ]
                                                }
                                              },
                                              "required": [
                                                "field",
                                                "operator",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            },
                                            {
                                              "type": "object",
                                              "properties": {
                                                "children": {
                                                  "minItems": 1,
                                                  "maxItems": 100,
                                                  "type": "array",
                                                  "items": {
                                                    "anyOf": [
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "field": {
                                                            "type": "string",
                                                            "minLength": 1,
                                                            "maxLength": 512
                                                          },
                                                          "operator": {
                                                            "type": "string",
                                                            "enum": [
                                                              "=",
                                                              "!=",
                                                              ">",
                                                              "<",
                                                              ">=",
                                                              "<=",
                                                              "contains",
                                                              "not_contains",
                                                              "in",
                                                              "not_in",
                                                              "is_empty",
                                                              "is_not_empty"
                                                            ]
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "const": "rule"
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string",
                                                                "maxLength": 32768
                                                              },
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              },
                                                              {
                                                                "maxItems": 100,
                                                                "type": "array",
                                                                "items": {
                                                                  "anyOf": [
                                                                    {
                                                                      "type": "string",
                                                                      "maxLength": 32768
                                                                    },
                                                                    {
                                                                      "type": "number"
                                                                    },
                                                                    {
                                                                      "type": "boolean"
                                                                    }
                                                                  ]
                                                                }
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "field",
                                                          "operator",
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      },
                                                      {
                                                        "type": "object",
                                                        "properties": {
                                                          "children": {
                                                            "minItems": 1,
                                                            "maxItems": 100,
                                                            "type": "array",
                                                            "items": {
                                                              "anyOf": [
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "field": {
                                                                      "type": "string",
                                                                      "minLength": 1,
                                                                      "maxLength": 512
                                                                    },
                                                                    "operator": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "=",
                                                                        "!=",
                                                                        ">",
                                                                        "<",
                                                                        ">=",
                                                                        "<=",
                                                                        "contains",
                                                                        "not_contains",
                                                                        "in",
                                                                        "not_in",
                                                                        "is_empty",
                                                                        "is_not_empty"
                                                                      ]
                                                                    },
                                                                    "type": {
                                                                      "type": "string",
                                                                      "const": "rule"
                                                                    },
                                                                    "value": {
                                                                      "anyOf": [
                                                                        {
                                                                          "type": "string",
                                                                          "maxLength": 32768
                                                                        },
                                                                        {
                                                                          "type": "number"
                                                                        },
                                                                        {
                                                                          "type": "boolean"
                                                                        },
                                                                        {
                                                                          "type": "null"
                                                                        },
                                                                        {
                                                                          "maxItems": 100,
                                                                          "type": "array",
                                                                          "items": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "maxLength": 32768
                                                                              },
                                                                              {
                                                                                "type": "number"
                                                                              },
                                                                              {
                                                                                "type": "boolean"
                                                                              }
                                                                            ]
                                                                          }
                                                                        }
                                                                      ]
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "field",
                                                                    "operator",
                                                                    "type"
                                                                  ],
                                                                  "additionalProperties": false
                                                                },
                                                                {
                                                                  "type": "object",
                                                                  "properties": {
                                                                    "children": {
                                                                      "minItems": 1,
                                                                      "maxItems": 100,
                                                                      "type": "array",
                                                                      "items": {
                                                                        "type": "object",
                                                                        "properties": {
                                                                          "field": {
                                                                            "type": "string",
                                                                            "minLength": 1,
                                                                            "maxLength": 512
                                                                          },
                                                                          "operator": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                              "=",
                                                                              "!=",
                                                                              ">",
                                                                              "<",
                                                                              ">=",
                                                                              "<=",
                                                                              "contains",
                                                                              "not_contains",
                                                                              "in",
                                                                              "not_in",
                                                                              "is_empty",
                                                                              "is_not_empty"
                                                                            ]
                                                                          },
                                                                          "type": {
                                                                            "type": "string",
                                                                            "const": "rule"
                                                                          },
                                                                          "value": {
                                                                            "anyOf": [
                                                                              {
                                                                                "type": "string",
                                                                                "maxLength": 32768
                                                                              },
                                                                              {
                                                                                "type": "number"
                                                                              },
                                                                              {
                                                                                "type": "boolean"
                                                                              },
                                                                              {
                                                                                "type": "null"
                                                                              },
                                                                              {
                                                                                "maxItems": 100,
                                                                                "type": "array",
                                                                                "items": {
                                                                                  "anyOf": [
                                                                                    {
                                                                                      "type": "string",
                                                                                      "maxLength": 32768
                                                                                    },
                                                                                    {
                                                                                      "type": "number"
                                                                                    },
                                                                                    {
                                                                                      "type": "boolean"
                                                                                    }
                                                                                  ]
                                                                                }
                                                                              }
                                                                            ]
                                                                          }
                                                                        },
                                                                        "required": [
                                                                          "field",
                                                                          "operator",
                                                                          "type"
                                                                        ],
                                                                        "additionalProperties": false
                                                                      }
                                                                    },
                                                                    "logic": {
                                                                      "type": "string",
                                                                      "enum": [
                                                                        "AND",
                                                                        "OR"
                                                                      ]
                                                                    },
                                                                    "type": {
                                                                      "type": "string",
                                                                      "const": "group"
                                                                    }
                                                                  },
                                                                  "required": [
                                                                    "children",
                                                                    "logic",
                                                                    "type"
                                                                  ],
                                                                  "additionalProperties": false
                                                                }
                                                              ]
                                                            }
                                                          },
                                                          "logic": {
                                                            "type": "string",
                                                            "enum": [
                                                              "AND",
                                                              "OR"
                                                            ]
                                                          },
                                                          "type": {
                                                            "type": "string",
                                                            "const": "group"
                                                          }
                                                        },
                                                        "required": [
                                                          "children",
                                                          "logic",
                                                          "type"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    ]
                                                  }
                                                },
                                                "logic": {
                                                  "type": "string",
                                                  "enum": [
                                                    "AND",
                                                    "OR"
                                                  ]
                                                },
                                                "type": {
                                                  "type": "string",
                                                  "const": "group"
                                                }
                                              },
                                              "required": [
                                                "children",
                                                "logic",
                                                "type"
                                              ],
                                              "additionalProperties": false
                                            }
                                          ]
                                        }
                                      },
                                      "logic": {
                                        "type": "string",
                                        "enum": [
                                          "AND",
                                          "OR"
                                        ]
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "group"
                                      }
                                    },
                                    "required": [
                                      "children",
                                      "logic",
                                      "type"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "logic": {
                              "type": "string",
                              "enum": [
                                "AND",
                                "OR"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "const": "group"
                            }
                          },
                          "required": [
                            "children",
                            "logic",
                            "type"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "logic": {
                    "type": "string",
                    "enum": [
                      "AND",
                      "OR"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "const": "group"
                  }
                },
                "required": [
                  "children",
                  "logic",
                  "type"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "PublicDetectionConversation": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PublicUuid"
          },
          "runId": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "idle",
              "running",
              "completed",
              "waiting_for_input",
              "failed",
              "cancelled"
            ]
          },
          "messages": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/PublicUuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant"
                  ]
                },
                "content": {
                  "type": "string",
                  "maxLength": 8000
                }
              },
              "required": [
                "id",
                "role",
                "content"
              ],
              "additionalProperties": false
            }
          },
          "clarification": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "messageId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "questions": {
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "prompt": {
                          "type": "string",
                          "maxLength": 512
                        },
                        "choices": {
                          "maxItems": 5,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "maxLength": 200
                              },
                              "label": {
                                "type": "string",
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "id",
                              "label"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "prompt",
                        "choices"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "messageId",
                  "questions"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "draftIds": {
            "maxItems": 40,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUuid"
            }
          },
          "cancelRequested": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "runId",
          "status",
          "messages",
          "clarification",
          "draftIds",
          "cancelRequested"
        ],
        "additionalProperties": false
      },
      "PublicDetectionCreateInput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "default": 0.5,
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "classifier"
              },
              "config": {
                "type": "object",
                "properties": {
                  "classifier_slug": {
                    "type": "string",
                    "enum": [
                      "jailbreaking",
                      "nsfw",
                      "hate",
                      "refusals"
                    ]
                  }
                },
                "required": [
                  "classifier_slug"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "classifier"
              },
              "config": {
                "type": "object",
                "properties": {
                  "classifier_slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "backend": {
                    "type": "string",
                    "enum": [
                      "azure",
                      "decision"
                    ]
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "span",
                      "trace"
                    ]
                  }
                },
                "required": [
                  "classifier_slug"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "default": 0.5,
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "regex"
              },
              "config": {
                "type": "object",
                "properties": {
                  "case_sensitive": {
                    "default": false,
                    "type": "boolean"
                  },
                  "input_pattern": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32768
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "operator": {
                    "default": "OR",
                    "type": "string",
                    "enum": [
                      "AND",
                      "OR"
                    ]
                  },
                  "output_pattern": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32768
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "default": 0.5,
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "conditional"
              },
              "config": {
                "$ref": "#/components/schemas/PublicDetectionConditionalConfigOutput"
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "default": 0.5,
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "pii"
              },
              "config": {
                "type": "object",
                "properties": {
                  "entities": {
                    "anyOf": [
                      {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "EMAIL_ADDRESS",
                            "PHONE_NUMBER",
                            "CREDIT_CARD",
                            "IP_ADDRESS",
                            "URL"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "custom_trained"
              },
              "config": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "custom_detection_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "setfit",
                      "qlora"
                    ]
                  },
                  "artifact_uri": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "temperature": {
                    "default": 1,
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "project_id",
                  "custom_detection_id",
                  "version",
                  "method"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "trace_rules"
              },
              "config": {
                "$ref": "#/components/schemas/PublicDetectionTraceRulesConfigInput"
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "decision"
              },
              "config": {
                "type": "object",
                "properties": {
                  "criterion": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "target": {
                    "default": "span",
                    "type": "string",
                    "enum": [
                      "span",
                      "trace",
                      "session"
                    ]
                  },
                  "context": {
                    "default": "target",
                    "type": "string",
                    "enum": [
                      "target",
                      "related"
                    ]
                  }
                },
                "required": [
                  "criterion"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "code"
              },
              "config": {
                "$ref": "#/components/schemas/PublicDetectionCodeMutationConfigInput"
              }
            },
            "required": [
              "displayName",
              "groupId",
              "type",
              "config"
            ],
            "additionalProperties": false
          }
        ]
      },
      "PublicDetectionCreateOutput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "default": 0.5,
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "classifier"
              },
              "config": {
                "type": "object",
                "properties": {
                  "classifier_slug": {
                    "type": "string",
                    "enum": [
                      "jailbreaking",
                      "nsfw",
                      "hate",
                      "refusals"
                    ]
                  }
                },
                "required": [
                  "classifier_slug"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "threshold",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "classifier"
              },
              "config": {
                "type": "object",
                "properties": {
                  "classifier_slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "backend": {
                    "type": "string",
                    "enum": [
                      "azure",
                      "decision"
                    ]
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "span",
                      "trace"
                    ]
                  }
                },
                "required": [
                  "classifier_slug"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "default": 0.5,
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "regex"
              },
              "config": {
                "type": "object",
                "properties": {
                  "case_sensitive": {
                    "default": false,
                    "type": "boolean"
                  },
                  "input_pattern": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32768
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "operator": {
                    "default": "OR",
                    "type": "string",
                    "enum": [
                      "AND",
                      "OR"
                    ]
                  },
                  "output_pattern": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32768
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "case_sensitive",
                  "operator"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "threshold",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "default": 0.5,
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "conditional"
              },
              "config": {
                "$ref": "#/components/schemas/PublicDetectionConditionalConfigOutput"
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "threshold",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "default": 0.5,
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "pii"
              },
              "config": {
                "type": "object",
                "properties": {
                  "entities": {
                    "anyOf": [
                      {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "EMAIL_ADDRESS",
                            "PHONE_NUMBER",
                            "CREDIT_CARD",
                            "IP_ADDRESS",
                            "URL"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "threshold",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "custom_trained"
              },
              "config": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "custom_detection_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "setfit",
                      "qlora"
                    ]
                  },
                  "artifact_uri": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "temperature": {
                    "default": 1,
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "project_id",
                  "custom_detection_id",
                  "version",
                  "method",
                  "temperature"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "trace_rules"
              },
              "config": {
                "$ref": "#/components/schemas/PublicDetectionTraceRulesConfigOutput"
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "decision"
              },
              "config": {
                "type": "object",
                "properties": {
                  "criterion": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "target": {
                    "default": "span",
                    "type": "string",
                    "enum": [
                      "span",
                      "trace",
                      "session"
                    ]
                  },
                  "context": {
                    "default": "target",
                    "type": "string",
                    "enum": [
                      "target",
                      "related"
                    ]
                  }
                },
                "required": [
                  "criterion",
                  "target",
                  "context"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "type",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "default": true,
                "type": "boolean"
              },
              "runOn": {
                "$ref": "#/components/schemas/PublicDetectionRunOnOutput"
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "code"
              },
              "config": {
                "$ref": "#/components/schemas/PublicDetectionCodeConfigOutput"
              }
            },
            "required": [
              "displayName",
              "groupId",
              "isActive",
              "runOn",
              "type",
              "config"
            ],
            "additionalProperties": false
          }
        ]
      },
      "PublicDetectionDetail": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "createdAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "groupName": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "type": "boolean"
              },
              "showHistoricalResults": {
                "type": "boolean"
              },
              "activeAlertCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled"
                ]
              },
              "catalogRevision": {
                "type": "string",
                "maxLength": 128
              },
              "policyRevision": {
                "type": "string",
                "maxLength": 128
              },
              "issueSemantics": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slug": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "classifier"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runOn": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session",
                          "span_type",
                          "span_name"
                        ]
                      },
                      "span_types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "span_names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "frequency"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "classifier_slug": {
                        "type": "string",
                        "minLength": 1
                      },
                      "backend": {
                        "default": "azure",
                        "type": "string",
                        "enum": [
                          "azure",
                          "decision"
                        ]
                      },
                      "target": {
                        "default": "span",
                        "type": "string",
                        "enum": [
                          "span",
                          "trace"
                        ]
                      }
                    },
                    "required": [
                      "classifier_slug",
                      "backend",
                      "target"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "createdAt",
              "displayName",
              "groupId",
              "groupName",
              "id",
              "isActive",
              "slug",
              "threshold",
              "type",
              "updatedAt",
              "batchFields",
              "description",
              "generatedDescription",
              "runOn",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "createdAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "groupName": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "type": "boolean"
              },
              "showHistoricalResults": {
                "type": "boolean"
              },
              "activeAlertCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled"
                ]
              },
              "catalogRevision": {
                "type": "string",
                "maxLength": 128
              },
              "policyRevision": {
                "type": "string",
                "maxLength": 128
              },
              "issueSemantics": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slug": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "regex"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runOn": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session",
                          "span_type",
                          "span_name"
                        ]
                      },
                      "span_types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "span_names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "frequency"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "input_pattern": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "output_pattern": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "operator": {
                        "default": "OR",
                        "type": "string",
                        "enum": [
                          "AND",
                          "OR"
                        ]
                      },
                      "case_sensitive": {
                        "default": false,
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "operator",
                      "case_sensitive"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "createdAt",
              "displayName",
              "groupId",
              "groupName",
              "id",
              "isActive",
              "slug",
              "threshold",
              "type",
              "updatedAt",
              "batchFields",
              "description",
              "generatedDescription",
              "runOn",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "createdAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "groupName": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "type": "boolean"
              },
              "showHistoricalResults": {
                "type": "boolean"
              },
              "activeAlertCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled"
                ]
              },
              "catalogRevision": {
                "type": "string",
                "maxLength": 128
              },
              "policyRevision": {
                "type": "string",
                "maxLength": 128
              },
              "issueSemantics": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slug": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "conditional"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runOn": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session",
                          "span_type",
                          "span_name"
                        ]
                      },
                      "span_types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "span_names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "frequency"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionConditionalConfigOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "createdAt",
              "displayName",
              "groupId",
              "groupName",
              "id",
              "isActive",
              "slug",
              "threshold",
              "type",
              "updatedAt",
              "batchFields",
              "description",
              "generatedDescription",
              "runOn",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "createdAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "groupName": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "type": "boolean"
              },
              "showHistoricalResults": {
                "type": "boolean"
              },
              "activeAlertCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled"
                ]
              },
              "catalogRevision": {
                "type": "string",
                "maxLength": 128
              },
              "policyRevision": {
                "type": "string",
                "maxLength": 128
              },
              "issueSemantics": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slug": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "pii"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runOn": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session",
                          "span_type",
                          "span_name"
                        ]
                      },
                      "span_types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "span_names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "frequency"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "entities": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "createdAt",
              "displayName",
              "groupId",
              "groupName",
              "id",
              "isActive",
              "slug",
              "threshold",
              "type",
              "updatedAt",
              "batchFields",
              "description",
              "generatedDescription",
              "runOn",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "createdAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "groupName": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "type": "boolean"
              },
              "showHistoricalResults": {
                "type": "boolean"
              },
              "activeAlertCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled"
                ]
              },
              "catalogRevision": {
                "type": "string",
                "maxLength": 128
              },
              "policyRevision": {
                "type": "string",
                "maxLength": 128
              },
              "issueSemantics": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slug": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "custom_trained"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runOn": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session",
                          "span_type",
                          "span_name"
                        ]
                      },
                      "span_types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "span_names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "frequency"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "project_id": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "custom_detection_id": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "version": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "method": {
                        "type": "string",
                        "enum": [
                          "setfit",
                          "qlora"
                        ]
                      },
                      "artifact_uri": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "temperature": {
                        "default": 1,
                        "type": "number",
                        "exclusiveMinimum": 0
                      }
                    },
                    "required": [
                      "project_id",
                      "custom_detection_id",
                      "version",
                      "method",
                      "temperature"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "createdAt",
              "displayName",
              "groupId",
              "groupName",
              "id",
              "isActive",
              "slug",
              "threshold",
              "type",
              "updatedAt",
              "batchFields",
              "description",
              "generatedDescription",
              "runOn",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "createdAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "groupName": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "type": "boolean"
              },
              "showHistoricalResults": {
                "type": "boolean"
              },
              "activeAlertCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled"
                ]
              },
              "catalogRevision": {
                "type": "string",
                "maxLength": 128
              },
              "policyRevision": {
                "type": "string",
                "maxLength": 128
              },
              "issueSemantics": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slug": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "code"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runOn": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session",
                          "span_type",
                          "span_name"
                        ]
                      },
                      "span_types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "span_names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "frequency"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionCodeConfigOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "createdAt",
              "displayName",
              "groupId",
              "groupName",
              "id",
              "isActive",
              "slug",
              "threshold",
              "type",
              "updatedAt",
              "batchFields",
              "description",
              "generatedDescription",
              "runOn",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "createdAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "groupName": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "type": "boolean"
              },
              "showHistoricalResults": {
                "type": "boolean"
              },
              "activeAlertCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled"
                ]
              },
              "catalogRevision": {
                "type": "string",
                "maxLength": 128
              },
              "policyRevision": {
                "type": "string",
                "maxLength": 128
              },
              "issueSemantics": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slug": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "trace_rules"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runOn": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session",
                          "span_type",
                          "span_name"
                        ]
                      },
                      "span_types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "span_names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "frequency"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionTraceRulesConfigOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "createdAt",
              "displayName",
              "groupId",
              "groupName",
              "id",
              "isActive",
              "slug",
              "threshold",
              "type",
              "updatedAt",
              "batchFields",
              "description",
              "generatedDescription",
              "runOn",
              "config"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "createdAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "groupId": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "groupName": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "$ref": "#/components/schemas/PublicUuid"
              },
              "isActive": {
                "type": "boolean"
              },
              "showHistoricalResults": {
                "type": "boolean"
              },
              "activeAlertCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled"
                ]
              },
              "catalogRevision": {
                "type": "string",
                "maxLength": 128
              },
              "policyRevision": {
                "type": "string",
                "maxLength": 128
              },
              "issueSemantics": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slug": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "threshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "type": {
                "type": "string",
                "const": "decision"
              },
              "updatedAt": {
                "$ref": "#/components/schemas/PublicUtcTimestamp"
              },
              "batchFields": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedDescription": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32768
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "runOn": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "frequency": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session",
                          "span_type",
                          "span_name"
                        ]
                      },
                      "span_types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "span_names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "frequency"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "criterion": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4000
                      },
                      "target": {
                        "default": "span",
                        "type": "string",
                        "enum": [
                          "span",
                          "trace",
                          "session"
                        ]
                      },
                      "context": {
                        "default": "target",
                        "type": "string",
                        "enum": [
                          "target",
                          "related"
                        ]
                      }
                    },
                    "required": [
                      "criterion",
                      "target",
                      "context"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "createdAt",
              "displayName",
              "groupId",
              "groupName",
              "id",
              "isActive",
              "slug",
              "threshold",
              "type",
              "updatedAt",
              "batchFields",
              "description",
              "generatedDescription",
              "runOn",
              "config"
            ],
            "additionalProperties": false
          }
        ]
      },
      "PublicDetectionDraft": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/PublicUuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "testing",
              "ready",
              "blocked",
              "active",
              "paused",
              "deleted"
            ]
          },
          "revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "approvalFingerprint": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "previewUsable": {
            "type": "boolean"
          },
          "goal": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "proposal": {
            "type": "object",
            "properties": {
              "displayName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 8000
              },
              "type": {
                "type": "string",
                "enum": [
                  "classifier",
                  "regex",
                  "conditional",
                  "pii",
                  "custom_trained",
                  "code",
                  "trace_rules",
                  "decision"
                ]
              },
              "sentiment": {
                "type": "string",
                "enum": [
                  "negative",
                  "positive",
                  "neutral"
                ]
              },
              "config": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "runOn": {
                "type": "object",
                "properties": {
                  "frequency": {
                    "default": "trace",
                    "type": "string",
                    "enum": [
                      "trace",
                      "session",
                      "span_type",
                      "span_name"
                    ]
                  },
                  "span_types": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "span_names": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "frequency"
                ],
                "additionalProperties": false
              },
              "threshold": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "timeframeDays": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              }
            },
            "required": [
              "displayName",
              "description",
              "type",
              "sentiment",
              "config",
              "runOn",
              "threshold",
              "timeframeDays"
            ],
            "additionalProperties": false
          },
          "preview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "totalCount": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "scannedCount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "failedCount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "skippedCount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "stopReason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 80
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "samples": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "spanId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "spanName": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "spanType": {
                          "type": "string",
                          "maxLength": 50
                        },
                        "traceId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "startedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "targetType": {
                          "type": "string",
                          "enum": [
                            "span",
                            "trace",
                            "session"
                          ]
                        },
                        "targetId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "targetRevision": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(0|[1-9]\\d{0,18})$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "memberCount": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "matched": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "score": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "executionStatus": {
                          "type": "string",
                          "enum": [
                            "succeeded",
                            "failed",
                            "skipped",
                            "timeout"
                          ]
                        },
                        "evidenceSpanIds": {
                          "maxItems": 1000,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "evaluatedSamples": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "spanId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "spanName": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "spanType": {
                          "type": "string",
                          "maxLength": 50
                        },
                        "traceId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "startedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "targetType": {
                          "type": "string",
                          "enum": [
                            "span",
                            "trace",
                            "session"
                          ]
                        },
                        "targetId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "targetRevision": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(0|[1-9]\\d{0,18})$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "memberCount": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "matched": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "score": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "executionStatus": {
                          "type": "string",
                          "enum": [
                            "succeeded",
                            "failed",
                            "skipped",
                            "timeout"
                          ]
                        },
                        "evidenceSpanIds": {
                          "maxItems": 1000,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "codeValidation": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "passed"
                          },
                          "sourceHash": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          }
                        },
                        "required": [
                          "status",
                          "sourceHash"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "totalCount",
                  "scannedCount",
                  "failedCount",
                  "skippedCount",
                  "stopReason",
                  "samples",
                  "evaluatedSamples",
                  "codeValidation"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "detectionId": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "$ref": "#/components/schemas/PublicUtcTimestamp"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/PublicUtcTimestamp"
          },
          "blockedReason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "revision",
          "fingerprint",
          "approvalFingerprint",
          "previewUsable",
          "goal",
          "proposal",
          "preview",
          "detectionId",
          "createdAt",
          "updatedAt",
          "blockedReason"
        ],
        "additionalProperties": false
      },
      "PublicDetectionIssueSemanticsOutput": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "string",
            "const": "detector-issue-semantics-v1"
          },
          "polarity": {
            "type": "string",
            "enum": [
              "problem",
              "healthy",
              "informational",
              "unknown"
            ]
          },
          "authority": {
            "default": "none",
            "type": "string",
            "enum": [
              "none",
              "project_authoritative"
            ]
          },
          "truth_role": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "contract_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "contract_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "schema_version",
          "polarity",
          "authority"
        ],
        "additionalProperties": false
      },
      "PublicDetectionRunOnInput": {
        "default": {
          "frequency": "trace"
        },
        "type": "object",
        "properties": {
          "frequency": {
            "default": "trace",
            "type": "string",
            "enum": [
              "trace",
              "session",
              "span_type",
              "span_name"
            ]
          },
          "span_names": {
            "anyOf": [
              {
                "maxItems": 128,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1024
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "span_types": {
            "anyOf": [
              {
                "maxItems": 128,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "PublicDetectionRunOnOutput": {
        "default": {
          "frequency": "trace"
        },
        "type": "object",
        "properties": {
          "frequency": {
            "default": "trace",
            "type": "string",
            "enum": [
              "trace",
              "session",
              "span_type",
              "span_name"
            ]
          },
          "span_names": {
            "anyOf": [
              {
                "maxItems": 128,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1024
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "span_types": {
            "anyOf": [
              {
                "maxItems": 128,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "frequency"
        ],
        "additionalProperties": false
      },
      "PublicDetectionSummary": {
        "type": "object",
        "properties": {
          "createdAt": {
            "$ref": "#/components/schemas/PublicUtcTimestamp"
          },
          "displayName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "groupId": {
            "$ref": "#/components/schemas/PublicUuid"
          },
          "groupName": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "$ref": "#/components/schemas/PublicUuid"
          },
          "isActive": {
            "type": "boolean"
          },
          "showHistoricalResults": {
            "type": "boolean"
          },
          "activeAlertCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "lifecycleStatus": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "disabled"
            ]
          },
          "catalogRevision": {
            "type": "string",
            "maxLength": 128
          },
          "policyRevision": {
            "type": "string",
            "maxLength": 128
          },
          "issueSemantics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
              },
              {
                "type": "null"
              }
            ]
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "classifier",
              "regex",
              "conditional",
              "pii",
              "custom_trained",
              "code",
              "trace_rules",
              "decision"
            ]
          },
          "updatedAt": {
            "$ref": "#/components/schemas/PublicUtcTimestamp"
          }
        },
        "required": [
          "createdAt",
          "displayName",
          "groupId",
          "groupName",
          "id",
          "isActive",
          "slug",
          "threshold",
          "type",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PublicDetectionTraceRulesConfigInput": {
        "type": "object",
        "properties": {
          "schema_version": {
            "default": "trace-rules.v1",
            "type": "string",
            "const": "trace-rules.v1"
          },
          "combine": {
            "type": "string",
            "enum": [
              "all",
              "any"
            ]
          },
          "rows": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "match"
                    },
                    "span": {
                      "type": "object",
                      "properties": {
                        "tests": {
                          "minItems": 1,
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "op": {
                                "type": "string",
                                "enum": [
                                  "is",
                                  "is_not",
                                  "in",
                                  "not_in",
                                  "contains",
                                  "not_contains",
                                  "matches",
                                  "not_matches",
                                  "contains_pii",
                                  "not_contains_pii",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "exists",
                                  "not_exists"
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {},
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "field",
                              "op"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tests"
                      ],
                      "additionalProperties": false
                    },
                    "quantifier": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at_least",
                            "at_most",
                            "exactly",
                            "none"
                          ]
                        },
                        "count": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "relation": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "preceded_by",
                                "not_preceded_by",
                                "followed_by",
                                "not_followed_by"
                              ]
                            },
                            "span": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "minItems": 1,
                                  "maxItems": 12,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "field": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "op": {
                                        "type": "string",
                                        "enum": [
                                          "is",
                                          "is_not",
                                          "in",
                                          "not_in",
                                          "contains",
                                          "not_contains",
                                          "matches",
                                          "not_matches",
                                          "contains_pii",
                                          "not_contains_pii",
                                          "gt",
                                          "gte",
                                          "lt",
                                          "lte",
                                          "exists",
                                          "not_exists"
                                        ]
                                      },
                                      "value": {
                                        "anyOf": [
                                          {},
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "field",
                                      "op"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "tests"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "kind",
                            "span"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "span",
                    "quantifier"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "aggregate"
                    },
                    "function": {
                      "type": "string",
                      "enum": [
                        "count",
                        "sum",
                        "average",
                        "minimum",
                        "maximum"
                      ]
                    },
                    "field": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 128
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "where": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "tests": {
                              "minItems": 1,
                              "maxItems": 12,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "is",
                                      "is_not",
                                      "in",
                                      "not_in",
                                      "contains",
                                      "not_contains",
                                      "matches",
                                      "not_matches",
                                      "contains_pii",
                                      "not_contains_pii",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "exists",
                                      "not_exists"
                                    ]
                                  },
                                  "value": {
                                    "anyOf": [
                                      {},
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "field",
                                  "op"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "tests"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "compare": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at_least",
                            "at_most",
                            "exactly"
                          ]
                        },
                        "value": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000000
                        }
                      },
                      "required": [
                        "kind",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "kind",
                    "function",
                    "compare"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "repeat"
                    },
                    "span": {
                      "type": "object",
                      "properties": {
                        "tests": {
                          "minItems": 1,
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "op": {
                                "type": "string",
                                "enum": [
                                  "is",
                                  "is_not",
                                  "in",
                                  "not_in",
                                  "contains",
                                  "not_contains",
                                  "matches",
                                  "not_matches",
                                  "contains_pii",
                                  "not_contains_pii",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "exists",
                                  "not_exists"
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {},
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "field",
                              "op"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tests"
                      ],
                      "additionalProperties": false
                    },
                    "group_by": {
                      "type": "string",
                      "enum": [
                        "name",
                        "type",
                        "tool.name",
                        "llm.model"
                      ]
                    },
                    "compare": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at_least",
                            "at_most",
                            "exactly"
                          ]
                        },
                        "value": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000000
                        }
                      },
                      "required": [
                        "kind",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "kind",
                    "span",
                    "group_by",
                    "compare"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "trace"
                    },
                    "field": {
                      "type": "string",
                      "enum": [
                        "trace.input",
                        "trace.output",
                        "trace.status",
                        "trace.duration_ms"
                      ]
                    },
                    "op": {
                      "type": "string",
                      "enum": [
                        "is",
                        "is_not",
                        "in",
                        "not_in",
                        "contains",
                        "not_contains",
                        "matches",
                        "not_matches",
                        "contains_pii",
                        "not_contains_pii",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "exists",
                        "not_exists"
                      ]
                    },
                    "value": {
                      "anyOf": [
                        {},
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "field",
                    "op"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          }
        },
        "required": [
          "combine",
          "rows"
        ],
        "additionalProperties": false
      },
      "PublicDetectionTraceRulesConfigOutput": {
        "type": "object",
        "properties": {
          "schema_version": {
            "default": "trace-rules.v1",
            "type": "string",
            "const": "trace-rules.v1"
          },
          "combine": {
            "type": "string",
            "enum": [
              "all",
              "any"
            ]
          },
          "rows": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "match"
                    },
                    "span": {
                      "type": "object",
                      "properties": {
                        "tests": {
                          "minItems": 1,
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "op": {
                                "type": "string",
                                "enum": [
                                  "is",
                                  "is_not",
                                  "in",
                                  "not_in",
                                  "contains",
                                  "not_contains",
                                  "matches",
                                  "not_matches",
                                  "contains_pii",
                                  "not_contains_pii",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "exists",
                                  "not_exists"
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {},
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "field",
                              "op"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tests"
                      ],
                      "additionalProperties": false
                    },
                    "quantifier": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at_least",
                            "at_most",
                            "exactly",
                            "none"
                          ]
                        },
                        "count": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "relation": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "preceded_by",
                                "not_preceded_by",
                                "followed_by",
                                "not_followed_by"
                              ]
                            },
                            "span": {
                              "type": "object",
                              "properties": {
                                "tests": {
                                  "minItems": 1,
                                  "maxItems": 12,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "field": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "op": {
                                        "type": "string",
                                        "enum": [
                                          "is",
                                          "is_not",
                                          "in",
                                          "not_in",
                                          "contains",
                                          "not_contains",
                                          "matches",
                                          "not_matches",
                                          "contains_pii",
                                          "not_contains_pii",
                                          "gt",
                                          "gte",
                                          "lt",
                                          "lte",
                                          "exists",
                                          "not_exists"
                                        ]
                                      },
                                      "value": {
                                        "anyOf": [
                                          {},
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "field",
                                      "op"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "tests"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "kind",
                            "span"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "span",
                    "quantifier"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "aggregate"
                    },
                    "function": {
                      "type": "string",
                      "enum": [
                        "count",
                        "sum",
                        "average",
                        "minimum",
                        "maximum"
                      ]
                    },
                    "field": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 128
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "where": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "tests": {
                              "minItems": 1,
                              "maxItems": 12,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "is",
                                      "is_not",
                                      "in",
                                      "not_in",
                                      "contains",
                                      "not_contains",
                                      "matches",
                                      "not_matches",
                                      "contains_pii",
                                      "not_contains_pii",
                                      "gt",
                                      "gte",
                                      "lt",
                                      "lte",
                                      "exists",
                                      "not_exists"
                                    ]
                                  },
                                  "value": {
                                    "anyOf": [
                                      {},
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "field",
                                  "op"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "tests"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "compare": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at_least",
                            "at_most",
                            "exactly"
                          ]
                        },
                        "value": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000000
                        }
                      },
                      "required": [
                        "kind",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "kind",
                    "function",
                    "compare"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "repeat"
                    },
                    "span": {
                      "type": "object",
                      "properties": {
                        "tests": {
                          "minItems": 1,
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "op": {
                                "type": "string",
                                "enum": [
                                  "is",
                                  "is_not",
                                  "in",
                                  "not_in",
                                  "contains",
                                  "not_contains",
                                  "matches",
                                  "not_matches",
                                  "contains_pii",
                                  "not_contains_pii",
                                  "gt",
                                  "gte",
                                  "lt",
                                  "lte",
                                  "exists",
                                  "not_exists"
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {},
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "field",
                              "op"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tests"
                      ],
                      "additionalProperties": false
                    },
                    "group_by": {
                      "type": "string",
                      "enum": [
                        "name",
                        "type",
                        "tool.name",
                        "llm.model"
                      ]
                    },
                    "compare": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "at_least",
                            "at_most",
                            "exactly"
                          ]
                        },
                        "value": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000000
                        }
                      },
                      "required": [
                        "kind",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "kind",
                    "span",
                    "group_by",
                    "compare"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "trace"
                    },
                    "field": {
                      "type": "string",
                      "enum": [
                        "trace.input",
                        "trace.output",
                        "trace.status",
                        "trace.duration_ms"
                      ]
                    },
                    "op": {
                      "type": "string",
                      "enum": [
                        "is",
                        "is_not",
                        "in",
                        "not_in",
                        "contains",
                        "not_contains",
                        "matches",
                        "not_matches",
                        "contains_pii",
                        "not_contains_pii",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "exists",
                        "not_exists"
                      ]
                    },
                    "value": {
                      "anyOf": [
                        {},
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "field",
                    "op"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          }
        },
        "required": [
          "schema_version",
          "combine",
          "rows"
        ],
        "additionalProperties": false
      },
      "PublicDetectionUpdateInput": {
        "type": "object",
        "properties": {
          "batchFields": {
            "anyOf": [
              {
                "maxItems": 128,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1024
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "config": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "classifier_slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "backend": {
                    "type": "string",
                    "enum": [
                      "azure",
                      "decision"
                    ]
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "span",
                      "trace"
                    ]
                  }
                },
                "required": [
                  "classifier_slug"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "case_sensitive": {
                    "default": false,
                    "type": "boolean"
                  },
                  "input_pattern": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32768
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "operator": {
                    "default": "OR",
                    "type": "string",
                    "enum": [
                      "AND",
                      "OR"
                    ]
                  },
                  "output_pattern": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32768
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/PublicDetectionConditionalConfigOutput"
              },
              {
                "type": "object",
                "properties": {
                  "entities": {
                    "anyOf": [
                      {
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "EMAIL_ADDRESS",
                            "PHONE_NUMBER",
                            "CREDIT_CARD",
                            "IP_ADDRESS",
                            "URL"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "project_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "custom_detection_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "setfit",
                      "qlora"
                    ]
                  },
                  "artifact_uri": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "temperature": {
                    "default": 1,
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "project_id",
                  "custom_detection_id",
                  "version",
                  "method"
                ],
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/PublicDetectionTraceRulesConfigInput"
              },
              {
                "type": "object",
                "properties": {
                  "criterion": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "target": {
                    "default": "span",
                    "type": "string",
                    "enum": [
                      "span",
                      "trace",
                      "session"
                    ]
                  },
                  "context": {
                    "default": "target",
                    "type": "string",
                    "enum": [
                      "target",
                      "related"
                    ]
                  }
                },
                "required": [
                  "criterion"
                ],
                "additionalProperties": false
              },
              {
                "$ref": "#/components/schemas/PublicDetectionCodeMutationConfigInput"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 32768
              },
              {
                "type": "null"
              }
            ]
          },
          "displayName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "groupId": {
            "$ref": "#/components/schemas/PublicUuid"
          },
          "runOn": {
            "type": "object",
            "properties": {
              "frequency": {
                "default": "trace",
                "type": "string",
                "enum": [
                  "trace",
                  "session",
                  "span_type",
                  "span_name"
                ]
              },
              "span_names": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "span_types": {
                "anyOf": [
                  {
                    "maxItems": 128,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "additionalProperties": false
      },
      "PublicOffsetTimestamp": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
      },
      "PublicSavedFilter": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "filters": {
            "description": "At most 100 total nodes and 262144 UTF-8 bytes after JSON normalization.",
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode8"
            },
            "maxItems": 100,
            "type": "array"
          }
        },
        "required": [
          "createdAt",
          "filters",
          "id",
          "name",
          "updatedAt"
        ],
        "type": "object"
      },
      "PublicSavedFilterCreateRequest": {
        "additionalProperties": false,
        "properties": {
          "filters": {
            "description": "At most 100 total nodes and 262144 UTF-8 bytes after JSON normalization.",
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode8"
            },
            "maxItems": 100,
            "type": "array"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "filters",
          "name"
        ],
        "type": "object"
      },
      "PublicSavedFilterDeleteRequest": {
        "additionalProperties": false,
        "properties": {
          "confirmation": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "confirmation"
        ],
        "type": "object"
      },
      "PublicSavedFilterEnvelope": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublicSavedFilter"
          },
          "requestId": {
            "pattern": "^req_[a-f0-9]{32}$",
            "type": "string"
          },
          "success": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "data",
          "requestId",
          "success"
        ],
        "type": "object"
      },
      "PublicSavedFilterGroup1": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "logicalOperator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterRule"
            },
            "maxItems": 100,
            "type": "array"
          },
          "type": {
            "const": "group",
            "type": "string"
          }
        },
        "required": [
          "id",
          "logicalOperator",
          "rules",
          "type"
        ],
        "type": "object"
      },
      "PublicSavedFilterGroup2": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "logicalOperator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode1"
            },
            "maxItems": 100,
            "type": "array"
          },
          "type": {
            "const": "group",
            "type": "string"
          }
        },
        "required": [
          "id",
          "logicalOperator",
          "rules",
          "type"
        ],
        "type": "object"
      },
      "PublicSavedFilterGroup3": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "logicalOperator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode2"
            },
            "maxItems": 100,
            "type": "array"
          },
          "type": {
            "const": "group",
            "type": "string"
          }
        },
        "required": [
          "id",
          "logicalOperator",
          "rules",
          "type"
        ],
        "type": "object"
      },
      "PublicSavedFilterGroup4": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "logicalOperator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode3"
            },
            "maxItems": 100,
            "type": "array"
          },
          "type": {
            "const": "group",
            "type": "string"
          }
        },
        "required": [
          "id",
          "logicalOperator",
          "rules",
          "type"
        ],
        "type": "object"
      },
      "PublicSavedFilterGroup5": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "logicalOperator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode4"
            },
            "maxItems": 100,
            "type": "array"
          },
          "type": {
            "const": "group",
            "type": "string"
          }
        },
        "required": [
          "id",
          "logicalOperator",
          "rules",
          "type"
        ],
        "type": "object"
      },
      "PublicSavedFilterGroup6": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "logicalOperator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode5"
            },
            "maxItems": 100,
            "type": "array"
          },
          "type": {
            "const": "group",
            "type": "string"
          }
        },
        "required": [
          "id",
          "logicalOperator",
          "rules",
          "type"
        ],
        "type": "object"
      },
      "PublicSavedFilterGroup7": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "logicalOperator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode6"
            },
            "maxItems": 100,
            "type": "array"
          },
          "type": {
            "const": "group",
            "type": "string"
          }
        },
        "required": [
          "id",
          "logicalOperator",
          "rules",
          "type"
        ],
        "type": "object"
      },
      "PublicSavedFilterGroup8": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "logicalOperator": {
            "enum": [
              "And",
              "Or"
            ],
            "type": "string"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode7"
            },
            "maxItems": 100,
            "type": "array"
          },
          "type": {
            "const": "group",
            "type": "string"
          }
        },
        "required": [
          "id",
          "logicalOperator",
          "rules",
          "type"
        ],
        "type": "object"
      },
      "PublicSavedFilterJsonDepth1": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterJsonScalar"
          },
          {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterJsonScalar"
            },
            "maxItems": 100,
            "type": "array"
          },
          {
            "additionalProperties": {
              "$ref": "#/components/schemas/PublicSavedFilterJsonScalar"
            },
            "maxProperties": 50,
            "propertyNames": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            "type": "object"
          }
        ]
      },
      "PublicSavedFilterJsonDepth2": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterJsonScalar"
          },
          {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterJsonDepth1"
            },
            "maxItems": 100,
            "type": "array"
          },
          {
            "additionalProperties": {
              "$ref": "#/components/schemas/PublicSavedFilterJsonDepth1"
            },
            "maxProperties": 50,
            "propertyNames": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            "type": "object"
          }
        ]
      },
      "PublicSavedFilterJsonScalar": {
        "anyOf": [
          {
            "maxLength": 4096,
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          }
        ]
      },
      "PublicSavedFilterList": {
        "additionalProperties": false,
        "properties": {
          "page": {
            "additionalProperties": false,
            "properties": {
              "hasMore": {
                "type": "boolean"
              },
              "limit": {
                "maximum": 100,
                "minimum": 1,
                "type": "integer"
              },
              "nextCursor": {
                "anyOf": [
                  {
                    "maxLength": 1024,
                    "minLength": 1,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "hasMore",
              "limit",
              "nextCursor"
            ],
            "type": "object"
          },
          "savedFilters": {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterSummary"
            },
            "maxItems": 100,
            "type": "array"
          }
        },
        "required": [
          "page",
          "savedFilters"
        ],
        "type": "object"
      },
      "PublicSavedFilterListEnvelope": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublicSavedFilterList"
          },
          "requestId": {
            "pattern": "^req_[a-f0-9]{32}$",
            "type": "string"
          },
          "success": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "data",
          "requestId",
          "success"
        ],
        "type": "object"
      },
      "PublicSavedFilterNode1": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterRule"
          },
          {
            "$ref": "#/components/schemas/PublicSavedFilterGroup1"
          }
        ]
      },
      "PublicSavedFilterNode2": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterRule"
          },
          {
            "$ref": "#/components/schemas/PublicSavedFilterGroup2"
          }
        ]
      },
      "PublicSavedFilterNode3": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterRule"
          },
          {
            "$ref": "#/components/schemas/PublicSavedFilterGroup3"
          }
        ]
      },
      "PublicSavedFilterNode4": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterRule"
          },
          {
            "$ref": "#/components/schemas/PublicSavedFilterGroup4"
          }
        ]
      },
      "PublicSavedFilterNode5": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterRule"
          },
          {
            "$ref": "#/components/schemas/PublicSavedFilterGroup5"
          }
        ]
      },
      "PublicSavedFilterNode6": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterRule"
          },
          {
            "$ref": "#/components/schemas/PublicSavedFilterGroup6"
          }
        ]
      },
      "PublicSavedFilterNode7": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterRule"
          },
          {
            "$ref": "#/components/schemas/PublicSavedFilterGroup7"
          }
        ]
      },
      "PublicSavedFilterNode8": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterRule"
          },
          {
            "$ref": "#/components/schemas/PublicSavedFilterGroup8"
          }
        ]
      },
      "PublicSavedFilterRule": {
        "additionalProperties": false,
        "properties": {
          "field": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "id": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "label": {
            "maxLength": 255,
            "type": "string"
          },
          "operator": {
            "enum": [
              "is",
              "is_not",
              "contains",
              "contains_any",
              "not_contains",
              "starts_with",
              "ends_with",
              "greater_than",
              "less_than",
              "is_empty",
              "is_not_empty",
              "is_within_range",
              "is_any_of",
              "is_not_any_of",
              "equals",
              "not_equals",
              "is_exactly"
            ],
            "type": "string"
          },
          "value": {
            "$ref": "#/components/schemas/PublicSavedFilterValue"
          }
        },
        "required": [
          "field",
          "id",
          "operator",
          "value"
        ],
        "type": "object"
      },
      "PublicSavedFilterSummary": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "id",
          "name",
          "updatedAt"
        ],
        "type": "object"
      },
      "PublicSavedFilterUpdateRequest": {
        "additionalProperties": false,
        "properties": {
          "filters": {
            "description": "At most 100 total nodes and 262144 UTF-8 bytes after JSON normalization.",
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterNode8"
            },
            "maxItems": 100,
            "type": "array"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [],
        "type": "object",
        "minProperties": 1
      },
      "PublicSavedFilterValue": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicSavedFilterJsonScalar"
          },
          {
            "items": {
              "$ref": "#/components/schemas/PublicSavedFilterJsonDepth2"
            },
            "maxItems": 100,
            "type": "array"
          },
          {
            "additionalProperties": {
              "$ref": "#/components/schemas/PublicSavedFilterJsonDepth2"
            },
            "maxProperties": 50,
            "propertyNames": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            "type": "object"
          }
        ]
      },
      "PublicUtcTimestamp": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
      },
      "PublicUuid": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      },
      "PublicEvaluationPassRule": {
        "anyOf": [
          {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "equals": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  }
                },
                "required": [
                  "equals"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "oneOf": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "oneOf"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "PublicLocalActivityEvent": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "goal",
              "experiment",
              "round",
              "dataset",
              "cases",
              "evaluation",
              "evaluator",
              "detection",
              "run",
              "comparison",
              "decision",
              "status"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "succeeded",
              "failed",
              "blocked",
              "cancelled",
              "refused"
            ]
          },
          "variant": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "A",
                  "B"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "attempt": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "activityId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "resourceId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "operationId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "errorCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "experimentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "roundId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "step": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "save",
                  "preview",
                  "validate",
                  "author",
                  "run",
                  "record",
                  "regrade"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "next": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "retry_later",
                      "resume_run",
                      "regrade",
                      "new_attempt",
                      "ask_for_permission",
                      "change_input",
                      "reuse_resource",
                      "contact_support"
                    ]
                  },
                  "command": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "retryAfterSeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 86400
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicLocalCheckpointView"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "issue": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]{0,63}$"
                  },
                  "caseId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "action",
          "status",
          "activityId",
          "resourceId",
          "operationId",
          "errorCode",
          "experimentId",
          "roundId",
          "id",
          "recordedAt"
        ],
        "additionalProperties": false
      },
      "PublicLocalAgentStatus": {
        "type": "object",
        "properties": {
          "aim": {
            "type": "string"
          },
          "task": {
            "type": "string"
          },
          "step": {
            "type": "string"
          },
          "progress": {
            "type": "object",
            "properties": {
              "done": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "total": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "done",
              "total"
            ],
            "additionalProperties": false
          },
          "roundId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "variant": {
            "type": "string",
            "enum": [
              "A",
              "B"
            ]
          },
          "updatedAt": {
            "type": "string"
          },
          "agent": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "name"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "aim",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PublicLocalCheckpoint": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "setup"
              },
              "setup": {
                "$ref": "#/components/schemas/PublicLocalSetup"
              }
            },
            "required": [
              "kind",
              "setup"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "preparation"
              },
              "roundId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "variant": {
                "type": "string",
                "enum": [
                  "A",
                  "B"
                ]
              },
              "preparation": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "preparing",
                      "ready",
                      "failed"
                    ]
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "source": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "const": "captured"
                          },
                          "digest": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          "files": {
                            "minItems": 1,
                            "maxItems": 25,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "path": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 400
                                },
                                "content": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 32768
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "path",
                                "content"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "state",
                          "digest",
                          "files"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "const": "partial"
                          },
                          "digest": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          "files": {
                            "minItems": 1,
                            "maxItems": 25,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "path": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 400
                                },
                                "content": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 32768
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "path",
                                "content"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "omitted": {
                            "minItems": 1,
                            "maxItems": 25,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "path": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 400
                                },
                                "reason": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200
                                }
                              },
                              "required": [
                                "path",
                                "reason"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "state",
                          "digest",
                          "files",
                          "omitted"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "const": "failed"
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "state",
                          "reason"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "const": "not_captured"
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "state",
                          "reason"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "git": {
                    "type": "object",
                    "properties": {
                      "branch": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "sha": {
                        "type": "string",
                        "pattern": "^[a-fA-F0-9]{7,64}$"
                      },
                      "repositoryUrl": {
                        "type": "string",
                        "maxLength": 200,
                        "pattern": "^https:\\/\\/github\\.com\\/[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}\\/(?!\\.{1,2}$)(?!.*\\.git$)[A-Za-z0-9._-]{1,100}$"
                      },
                      "repository": {
                        "type": "object",
                        "properties": {
                          "host": {
                            "type": "string",
                            "maxLength": 400,
                            "pattern": "^(?:[^@/\\s]+@)?[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$"
                          },
                          "owner": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_.-]{1,100}$"
                          },
                          "name": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_.-]{1,100}$"
                          }
                        },
                        "required": [
                          "host",
                          "owner",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "branch",
                      "sha"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "state",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "roundId",
              "variant",
              "preparation"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "checks"
              },
              "roundId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "runId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "requestKey": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "kind",
              "roundId",
              "runId",
              "requestKey"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "result"
              },
              "roundId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "result": {
                "$ref": "#/components/schemas/PublicLocalRoundResult"
              }
            },
            "required": [
              "kind",
              "roundId",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "$ref": "#/components/schemas/PublicLocalResourceCheckpoint"
          },
          {
            "$ref": "#/components/schemas/PublicLocalDecisionCheckpoint"
          },
          {
            "$ref": "#/components/schemas/PublicLocalStatusCheckpoint"
          }
        ]
      },
      "PublicLocalCheckpointView": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "preparation"
              },
              "roundId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "variant": {
                "type": "string",
                "enum": [
                  "A",
                  "B"
                ]
              },
              "preparation": {
                "$ref": "#/components/schemas/PublicLocalPreparation"
              }
            },
            "required": [
              "kind",
              "roundId",
              "variant",
              "preparation"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "setup"
              },
              "setup": {
                "$ref": "#/components/schemas/PublicLocalSetup"
              }
            },
            "required": [
              "kind",
              "setup"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "checks"
              },
              "roundId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "runId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "requestKey": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "kind",
              "roundId",
              "runId",
              "requestKey"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "result"
              },
              "roundId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "result": {
                "$ref": "#/components/schemas/PublicLocalRoundResult"
              }
            },
            "required": [
              "kind",
              "roundId",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "$ref": "#/components/schemas/PublicLocalResourceCheckpoint"
          },
          {
            "$ref": "#/components/schemas/PublicLocalDecisionCheckpoint"
          },
          {
            "$ref": "#/components/schemas/PublicLocalStatusCheckpoint"
          }
        ]
      },
      "PublicLocalCodeRevision": {
        "type": "object",
        "properties": {
          "sha": {
            "type": "string",
            "minLength": 40,
            "maxLength": 64
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "branch": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "sha",
          "subject"
        ],
        "additionalProperties": false
      },
      "PublicLocalDecision": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string",
            "enum": [
              "dataset",
              "cases",
              "judge",
              "questions",
              "detection",
              "trace_evidence",
              "attempt",
              "measure",
              "goal",
              "other"
            ]
          },
          "planned": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "chosen": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "code": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
          },
          "givenUp": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "resourceIds": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "roundId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "variant": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "A",
                  "B"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "recordedAt": {
            "type": "string"
          }
        },
        "required": [
          "topic",
          "planned",
          "chosen",
          "reason",
          "id",
          "roundId",
          "variant",
          "recordedAt"
        ],
        "additionalProperties": false
      },
      "PublicLocalDecisionCheckpoint": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "decision"
          },
          "roundId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "variant": {
            "type": "string",
            "enum": [
              "A",
              "B"
            ]
          },
          "decision": {
            "type": "object",
            "properties": {
              "topic": {
                "type": "string",
                "enum": [
                  "dataset",
                  "cases",
                  "judge",
                  "questions",
                  "detection",
                  "trace_evidence",
                  "attempt",
                  "measure",
                  "goal",
                  "other"
                ]
              },
              "planned": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "chosen": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "code": {
                "type": "string",
                "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
              },
              "givenUp": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "resourceIds": {
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              }
            },
            "required": [
              "topic",
              "planned",
              "chosen",
              "reason"
            ],
            "additionalProperties": false
          },
          "requestKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "kind",
          "decision",
          "requestKey"
        ],
        "additionalProperties": false
      },
      "PublicLocalPreparation": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "preparing",
              "ready",
              "failed"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "source": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "const": "captured"
                  },
                  "digest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "files": {
                    "maxItems": 25,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 400
                        },
                        "bytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "absent": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "path",
                        "bytes",
                        "absent"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "state",
                  "digest",
                  "files"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "const": "partial"
                  },
                  "digest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "files": {
                    "maxItems": 25,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 400
                        },
                        "bytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "absent": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "path",
                        "bytes",
                        "absent"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "omitted": {
                    "minItems": 1,
                    "maxItems": 25,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 400
                        },
                        "reason": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "path",
                        "reason"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "state",
                  "digest",
                  "files",
                  "omitted"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "const": "failed"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "state",
                  "reason"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "const": "not_captured"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "state",
                  "reason"
                ],
                "additionalProperties": false
              }
            ]
          },
          "git": {
            "type": "object",
            "properties": {
              "branch": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "sha": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{7,64}$"
              },
              "repositoryUrl": {
                "type": "string",
                "maxLength": 200,
                "pattern": "^https:\\/\\/github\\.com\\/[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}\\/(?!\\.{1,2}$)(?!.*\\.git$)[A-Za-z0-9._-]{1,100}$"
              },
              "repository": {
                "type": "object",
                "properties": {
                  "host": {
                    "type": "string",
                    "maxLength": 400,
                    "pattern": "^(?:[^@/\\s]+@)?[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$"
                  },
                  "owner": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.-]{1,100}$"
                  },
                  "name": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.-]{1,100}$"
                  }
                },
                "required": [
                  "host",
                  "owner",
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "branch",
              "sha"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "state",
          "message"
        ],
        "additionalProperties": false
      },
      "PublicLocalResourceCheckpoint": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "resource"
          },
          "role": {
            "type": "string",
            "enum": [
              "cases",
              "judge",
              "questions",
              "detection"
            ]
          },
          "resource": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "dataset",
                  "evaluation",
                  "evaluator",
                  "detection",
                  "safety_check"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "revision": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "disposition": {
                "type": "string",
                "enum": [
                  "created",
                  "reused"
                ]
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "kind",
              "id",
              "revision",
              "disposition",
              "reason"
            ],
            "additionalProperties": false
          },
          "datasetVersionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "caseIds": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "trials": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "formVersionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "kind",
          "role",
          "resource"
        ],
        "additionalProperties": false
      },
      "PublicLocalRound": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "experimentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "hypothesis": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "setup": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicLocalSetup"
              },
              {
                "type": "null"
              }
            ]
          },
          "variants": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicLocalVariants"
              },
              {
                "type": "null"
              }
            ]
          },
          "preparation": {
            "type": "object",
            "properties": {
              "A": {
                "$ref": "#/components/schemas/PublicLocalPreparation"
              },
              "B": {
                "$ref": "#/components/schemas/PublicLocalPreparation"
              }
            },
            "additionalProperties": false
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicLocalRoundResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "decisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicLocalDecision"
            }
          }
        },
        "required": [
          "id",
          "experimentId",
          "name",
          "hypothesis",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "PublicLocalRoundResult": {
        "type": "object",
        "properties": {
          "runA": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "runB": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "gradingBatchA": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "gradingBatchB": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "evidenceDigests": {
            "type": "object",
            "properties": {
              "A": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "B": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": [
              "A",
              "B"
            ],
            "additionalProperties": false
          },
          "detectionBatchIds": {
            "type": "object",
            "properties": {
              "A": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "B": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "A",
              "B"
            ],
            "additionalProperties": false
          },
          "outcome": {
            "type": "string",
            "enum": [
              "goal_met",
              "goal_not_met",
              "tradeoff",
              "incomplete"
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "b_wins",
              "keep_a",
              "tie",
              "inconclusive"
            ]
          },
          "decision": {
            "type": "string",
            "enum": [
              "continue",
              "finish"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "assessmentSource": {
            "type": "string",
            "const": "coding_agent"
          },
          "blocker": {
            "type": "object",
            "properties": {
              "stage": {
                "type": "string",
                "enum": [
                  "generation",
                  "grading",
                  "detection"
                ]
              },
              "code": {
                "type": "string",
                "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "requestId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "retryAfterSeconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 86400
              }
            },
            "required": [
              "stage",
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "report": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "url": {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              }
            },
            "required": [
              "title",
              "url"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "outcome",
          "decision",
          "reason"
        ],
        "additionalProperties": false
      },
      "PublicLocalRunLink": {
        "type": "object",
        "properties": {
          "experimentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "roundId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "variant": {
            "type": "string",
            "enum": [
              "A",
              "B"
            ]
          },
          "attempt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [
          "experimentId",
          "roundId",
          "variant",
          "attempt"
        ],
        "additionalProperties": false
      },
      "PublicLocalSetup": {
        "type": "object",
        "properties": {
          "gradingDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "detectionDigests": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "additionalProperties": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "datasetVersionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "caseIds": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "trials": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "formVersionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "evaluatorIds": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "detectionIds": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "measures": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "latency",
                "cost",
                "tokens",
                "detections",
                "quality"
              ]
            }
          },
          "resources": {
            "maxItems": 40,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "dataset",
                    "evaluation",
                    "evaluator",
                    "detection",
                    "safety_check"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "revision": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "disposition": {
                  "type": "string",
                  "enum": [
                    "created",
                    "reused"
                  ]
                },
                "reason": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": [
                "kind",
                "id",
                "revision",
                "disposition",
                "reason"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "datasetVersionId",
          "caseIds",
          "trials",
          "formVersionId",
          "evaluatorIds",
          "detectionIds",
          "resources"
        ],
        "additionalProperties": false
      },
      "PublicLocalSetupDraft": {
        "type": "object",
        "properties": {
          "cases": {
            "type": "object",
            "properties": {
              "datasetId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "datasetVersionId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "caseIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              },
              "trials": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "savedAt": {
                "type": "string"
              }
            },
            "required": [
              "datasetId",
              "datasetVersionId",
              "caseIds",
              "trials",
              "savedAt"
            ],
            "additionalProperties": false
          },
          "judges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "revision": {
                  "type": "string"
                },
                "disposition": {
                  "type": "string",
                  "enum": [
                    "created",
                    "reused"
                  ]
                },
                "reason": {
                  "type": "string"
                },
                "savedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "revision",
                "disposition",
                "reason",
                "savedAt"
              ],
              "additionalProperties": false
            }
          },
          "questions": {
            "type": "object",
            "properties": {
              "evaluationId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "formVersionId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "savedAt": {
                "type": "string"
              }
            },
            "required": [
              "evaluationId",
              "formVersionId",
              "savedAt"
            ],
            "additionalProperties": false
          },
          "detections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "revision": {
                  "type": "string"
                },
                "disposition": {
                  "type": "string",
                  "enum": [
                    "created",
                    "reused"
                  ]
                },
                "reason": {
                  "type": "string"
                },
                "savedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "revision",
                "disposition",
                "reason",
                "savedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "judges",
          "detections"
        ],
        "additionalProperties": false
      },
      "PublicLocalStatusCheckpoint": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "status"
          },
          "aim": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "task": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "step": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "progress": {
            "type": "object",
            "properties": {
              "done": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100000
              },
              "total": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100000
              }
            },
            "required": [
              "done",
              "total"
            ],
            "additionalProperties": false
          },
          "roundId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "variant": {
            "type": "string",
            "enum": [
              "A",
              "B"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "agent": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              }
            },
            "required": [
              "kind",
              "name"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "kind"
        ],
        "additionalProperties": false
      },
      "PublicLocalVariants": {
        "type": "object",
        "properties": {
          "A": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "changes": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "sourceRequired": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "name",
              "changes"
            ],
            "additionalProperties": false
          },
          "B": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "changes": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "sourceRequired": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "name",
              "changes"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "A",
          "B"
        ],
        "additionalProperties": false
      },
      "PublicSdkRunStatus": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "state": {
            "type": "string"
          },
          "deadlineAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "itemCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "completedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pendingCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "gradingHandoffState": {
            "type": "string",
            "enum": [
              "pending",
              "ready",
              "dispatched",
              "failed"
            ]
          },
          "caseOutputProtocol": {
            "type": "number",
            "const": 2
          },
          "gradingBlocker": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "retryAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable",
                  "retryAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "grading": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "evaluationId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "recordedBatchId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "candidateBatchId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "evaluationId",
                  "recordedBatchId",
                  "candidateBatchId"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "runId",
          "state",
          "deadlineAt",
          "itemCount",
          "completedCount",
          "failedCount",
          "pendingCount",
          "gradingHandoffState"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "GuestTokenAuth": {
        "type": "http",
        "scheme": "neatlogsguest",
        "description": "Guest review token sent only as Authorization: NeatLogsGuest <token>."
      },
      "PublicApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Public API key scoped to one project/org."
      },
      "PublicApiLegacyBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "NeatLogs public API key",
        "description": "Legacy Authorization: Bearer carrier for the same public API key. This is not OAuth 2.0 or a service token."
      },
      "ServiceAccountBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "NeatLogs service-account token",
        "description": "Service-account token using the nlsa_ prefix. Send only as Authorization: Bearer; each operation declares its required context parameters."
      },
      "OAuth2": {
        "type": "oauth2",
        "description": "First-party NeatLogs OAuth access tokens use the nloa_ prefix and Authorization: Bearer only; each operation declares its required context parameters.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.neatlogs.com/oauth/authorize",
            "tokenUrl": "https://app.neatlogs.com/oauth/token",
            "scopes": {
              "context:read": "context:read",
              "project:write": "project:write",
              "organization:read": "organization:read",
              "organization:write": "organization:write",
              "billing:read": "billing:read",
              "profile:read": "profile:read",
              "profile:write": "profile:write",
              "observability:read": "observability:read",
              "observability:write": "observability:write",
              "evaluation:read": "evaluation:read",
              "evaluation:write": "evaluation:write",
              "configuration:read": "configuration:read",
              "configuration:write": "configuration:write",
              "sharing:read": "sharing:read",
              "sharing:write": "sharing:write",
              "access:read": "access:read",
              "access:write": "access:write",
              "offline_access": "offline_access"
            }
          }
        },
        "x-device-authorization-url": "https://app.neatlogs.com/oauth/device/code"
      }
    },
    "responses": {
      "LocalTestingProblem400": {
        "description": "Invalid public API request",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/PublicApiProblem"
                },
                {
                  "$ref": "#/components/schemas/PublicApiProblem400"
                }
              ]
            }
          }
        }
      },
      "LocalTestingProblem401": {
        "description": "Missing or invalid public API credential",
        "headers": {
          "WWW-Authenticate": {
            "$ref": "#/components/headers/PublicApiWwwAuthenticate"
          },
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PublicApiProblemResponse401"
            }
          }
        }
      },
      "LocalTestingProblem403": {
        "description": "Public API request is not authorized",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PublicApiProblemResponse403"
            }
          }
        }
      },
      "LocalTestingProblem413": {
        "description": "Public API request body too large",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PublicApiProblemResponse413"
            }
          }
        }
      },
      "LocalTestingProblem415": {
        "description": "Unsupported public API request body",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PublicApiProblemResponse415"
            }
          }
        }
      },
      "LocalTestingProblem429": {
        "description": "Public API rate limit exceeded",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/PublicApiRateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/PublicApiRateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/PublicApiRateLimitReset"
          },
          "X-NeatLogs-RateLimit-Degraded": {
            "$ref": "#/components/headers/PublicApiRateLimitDegraded"
          },
          "X-NeatLogs-RateLimit-Limit": {
            "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
          },
          "X-NeatLogs-RateLimit-Policy": {
            "$ref": "#/components/headers/PublicApiRateLimitPolicy"
          },
          "X-NeatLogs-RateLimit-Remaining": {
            "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
          },
          "X-NeatLogs-RateLimit-Reset-After": {
            "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
          },
          "X-NeatLogs-RateLimit-Version": {
            "$ref": "#/components/headers/PublicApiRateLimitVersion"
          },
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/PublicApiRetryAfter"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PublicApiProblemResponse429"
            }
          }
        }
      },
      "LocalTestingProblem500": {
        "description": "Internal server error",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PublicApiProblemResponse500"
            }
          }
        }
      },
      "LocalTestingProblem503": {
        "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/PublicApiRetryAfter"
          },
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/PublicApiProblem"
                },
                {
                  "$ref": "#/components/schemas/PublicApiProblem503"
                }
              ]
            }
          },
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "const": "Backend is draining"
                }
              },
              "required": [
                "error"
              ],
              "additionalProperties": false
            }
          }
        }
      },
      "LocalTestingProblem404": {
        "description": "Run, example or trace not found",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PublicApiProblemResponse404"
            }
          }
        }
      },
      "LocalTestingProblem409": {
        "description": "Trace not yet ready, output conflict, or closed run",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/PublicApiProblemResponse409"
            }
          }
        }
      },
      "LocalTestingProblem422": {
        "description": "Trace does not belong to this local run",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/PublicApiRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/PublicApiProblem"
                },
                {
                  "$ref": "#/components/schemas/PublicApiProblem422"
                }
              ]
            }
          }
        }
      }
    }
  },
  "paths": {
    "/api/v1/public/datasets/{datasetId}/traces": {
      "post": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Append explicit recorded cases to the latest pinned dataset version",
        "description": "Create or trigger datasets traces.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_datasets_datasetId_traces",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Durable append queued; version drift rejects publication",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "captureId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "datasetId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "recording",
                            "queued",
                            "running",
                            "needs_review",
                            "completed",
                            "failed",
                            "cancelled"
                          ]
                        }
                      },
                      "required": [
                        "captureId",
                        "datasetId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Dataset or source not found in project",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset version or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Evaluation setup is unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "datasetId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idempotencyKey": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "traceIds": {
                    "default": [],
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  "spanIds": {
                    "default": [],
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "traceId",
                        "spanId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "includeRoot": {
                    "default": false,
                    "type": "boolean"
                  },
                  "skipExisting": {
                    "default": true,
                    "type": "boolean"
                  },
                  "baseVersionId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "replaceCases": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "caseId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "caseId",
                        "traceId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "idempotencyKey",
                  "baseVersionId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/datasets/from-traces": {
      "post": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Capture up to 500 explicit recorded traces or spans into a new dataset",
        "description": "Create or trigger datasets from-traces.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_datasets_from_traces",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Durable capture queued; poll dataset-capture-jobs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "captureId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "datasetId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "recording",
                            "queued",
                            "running",
                            "needs_review",
                            "completed",
                            "failed",
                            "cancelled"
                          ]
                        }
                      },
                      "required": [
                        "captureId",
                        "datasetId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Dataset or source not found in project",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset version or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Evaluation setup is unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idempotencyKey": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "traceIds": {
                    "default": [],
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  "spanIds": {
                    "default": [],
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "traceId",
                        "spanId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "includeRoot": {
                    "default": false,
                    "type": "boolean"
                  },
                  "skipExisting": {
                    "default": true,
                    "type": "boolean"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "experimentId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "idempotencyKey",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/experiments/local-activity": {
      "post": {
        "tags": [
          "public",
          "experiments"
        ],
        "summary": "Record a sanitized local CLI command outcome",
        "description": "Create or trigger experiments local-activity.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_experiments_local_activity",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Local command outcome recorded for a round attempt or an active local CLI session",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accepted": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "accepted"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Goal, experiment, or saved run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Revision, evidence, or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Unsupported experiment or grading configuration",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "description": "Experiment runs unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "goal",
                      "experiment",
                      "round",
                      "dataset",
                      "cases",
                      "evaluation",
                      "evaluator",
                      "detection",
                      "run",
                      "comparison",
                      "decision"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "running",
                      "succeeded",
                      "failed",
                      "blocked",
                      "cancelled",
                      "refused"
                    ]
                  },
                  "variant": {
                    "type": "string",
                    "enum": [
                      "A",
                      "B"
                    ]
                  },
                  "attempt": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "activityId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "resourceId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "operationId": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_]{1,128}$"
                  },
                  "errorCode": {
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
                  },
                  "experimentId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "roundId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "step": {
                    "type": "string",
                    "enum": [
                      "save",
                      "preview",
                      "validate",
                      "author",
                      "run",
                      "record",
                      "regrade"
                    ]
                  },
                  "next": {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "enum": [
                          "retry_later",
                          "resume_run",
                          "regrade",
                          "new_attempt",
                          "ask_for_permission",
                          "change_input",
                          "reuse_resource",
                          "contact_support"
                        ]
                      },
                      "command": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "retryAfterSeconds": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 86400
                      }
                    },
                    "required": [
                      "action"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "action",
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/experiments/local-connection": {
      "patch": {
        "tags": [
          "public",
          "experiments"
        ],
        "summary": "Record an active local CLI session",
        "description": "Partially update experiments local-connection.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_experiments_local_connection",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Local connection recorded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "active": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "active"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Goal, experiment, or saved run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Revision, evidence, or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Unsupported experiment or grading configuration",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "description": "Experiment runs unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "observedAt": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "sessionId",
                  "observedAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/local-experiments": {
      "get": {
        "tags": [
          "public",
          "experiments"
        ],
        "summary": "List one page of local coding-agent experiments",
        "description": "List or read public local-experiments.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_local_experiments",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Local experiments with their latest rounds",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "projectId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "goal": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string"
                              },
                              "rounds": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/PublicLocalRound"
                                }
                              },
                              "setup": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicLocalSetup"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "preparing",
                                  "running",
                                  "grading",
                                  "needs_attention",
                                  "results_ready",
                                  "completed"
                                ]
                              },
                              "roundCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "id",
                              "projectId",
                              "name",
                              "goal",
                              "createdAt",
                              "rounds",
                              "status",
                              "roundCount"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "items",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Goal, experiment, or saved run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Revision, evidence, or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Unsupported experiment or grading configuration",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "description": "Experiment runs unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "preparing",
                "running",
                "grading",
                "needs_attention",
                "results_ready",
                "completed"
              ]
            },
            "description": "status query parameter"
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "before query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "experiments"
        ],
        "summary": "Create a named local experiment draft without inventing model settings",
        "description": "Create or trigger public local-experiments.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_local_experiments",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Local experiment created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "rounds": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PublicLocalRound"
                          }
                        },
                        "setup": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicLocalSetup"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "goal",
                        "createdAt",
                        "rounds"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Goal, experiment, or saved run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Revision, evidence, or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Unsupported experiment or grading configuration",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "description": "Experiment runs unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "goal": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "requestKey": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "name",
                  "goal",
                  "requestKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/local-experiments/{experimentId}": {
      "get": {
        "tags": [
          "public",
          "experiments"
        ],
        "summary": "Read one page of a local experiment's rounds",
        "description": "Fetch a specific public local-experiments.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_local_experiments_experimentId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Local experiment",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "rounds": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PublicLocalRound"
                          }
                        },
                        "setup": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicLocalSetup"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "preparing",
                            "running",
                            "grading",
                            "needs_attention",
                            "results_ready",
                            "completed"
                          ]
                        },
                        "runAttempts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "roundId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "variant": {
                                "type": "string",
                                "enum": [
                                  "A",
                                  "B"
                                ]
                              },
                              "attempt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "state": {
                                "type": "string"
                              },
                              "total": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "completed": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "failed": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "detectionChecks": {
                                "type": "object",
                                "properties": {
                                  "total": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "succeeded": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "failed": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "pending": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  "flagged": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "total",
                                  "succeeded",
                                  "failed",
                                  "pending",
                                  "flagged"
                                ],
                                "additionalProperties": false
                              },
                              "rejection": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "pattern": "^[A-Z][A-Z0-9_]{0,63}$"
                                  },
                                  "message": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  "issue": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,63}$"
                                  },
                                  "caseId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "limit": {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "recordedAt": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "recordedAt"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "roundId",
                              "variant",
                              "attempt",
                              "state",
                              "total",
                              "completed",
                              "failed",
                              "detectionChecks"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "agentStatus": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicLocalAgentStatus"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "connection": {
                          "type": "object",
                          "properties": {
                            "active": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "active"
                          ],
                          "additionalProperties": false
                        },
                        "setupDraft": {
                          "$ref": "#/components/schemas/PublicLocalSetupDraft"
                        },
                        "decisions": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PublicLocalDecision"
                          }
                        },
                        "attemptsTruncated": {
                          "type": "boolean"
                        },
                        "nextRoundCursor": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "nextEventCursor": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PublicLocalActivityEvent"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "name",
                        "goal",
                        "createdAt",
                        "rounds",
                        "status",
                        "runAttempts",
                        "attemptsTruncated",
                        "nextRoundCursor",
                        "nextEventCursor",
                        "events"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Goal, experiment, or saved run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Revision, evidence, or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Unsupported experiment or grading configuration",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "description": "Experiment runs unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "experimentId path parameter"
          },
          {
            "name": "beforeRound",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "beforeRound query parameter"
          },
          {
            "name": "beforeEvent",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "beforeEvent query parameter"
          },
          {
            "name": "roundId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "roundId query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/local-experiments/{experimentId}/checkpoints": {
      "post": {
        "tags": [
          "public",
          "experiments"
        ],
        "summary": "Save shared setup, variant preparation, an agent-reported round decision or the agent's current status",
        "description": "Create or trigger local-experiments checkpoints.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_local_experiments_experimentId_checkpoints",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Workflow checkpoint saved",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "experimentId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "setup",
                            "preparation",
                            "checks",
                            "result",
                            "resource",
                            "decision",
                            "status"
                          ]
                        },
                        "accepted": {
                          "type": "boolean"
                        },
                        "detectionBatchId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "experimentId",
                        "kind",
                        "accepted"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Goal, experiment, or saved run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Revision, evidence, or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Unsupported experiment or grading configuration",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "description": "Experiment runs unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "experimentId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicLocalCheckpoint"
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/local-experiments/{experimentId}/rounds": {
      "post": {
        "tags": [
          "public",
          "experiments"
        ],
        "summary": "Create a hypothesis round in a local experiment",
        "description": "Create or trigger local-experiments rounds.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_local_experiments_experimentId_rounds",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Local experiment round created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicLocalRound"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "description": "Goal, experiment, or saved run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Revision, evidence, or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "description": "Unsupported experiment or grading configuration",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "description": "Experiment runs unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "experimentId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "experimentId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "hypothesis": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "variants": {
                    "$ref": "#/components/schemas/PublicLocalVariants"
                  },
                  "codeChange": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "base": {
                            "$ref": "#/components/schemas/PublicLocalCodeRevision"
                          },
                          "head": {
                            "$ref": "#/components/schemas/PublicLocalCodeRevision"
                          },
                          "repositoryUrl": {
                            "type": "string",
                            "maxLength": 200,
                            "pattern": "^https:\\/\\/github\\.com\\/[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}\\/(?!\\.{1,2}$)(?!.*\\.git$)[A-Za-z0-9._-]{1,100}$"
                          },
                          "repository": {
                            "type": "object",
                            "properties": {
                              "host": {
                                "type": "string",
                                "maxLength": 400,
                                "pattern": "^(?:[^@/\\s]+@)?[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$"
                              },
                              "owner": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_.-]{1,100}$"
                              },
                              "name": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_.-]{1,100}$"
                              }
                            },
                            "required": [
                              "host",
                              "owner",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "patch": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 32768
                          }
                        },
                        "required": [
                          "base",
                          "head",
                          "patch"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "base": {
                            "$ref": "#/components/schemas/PublicLocalCodeRevision"
                          },
                          "head": {
                            "$ref": "#/components/schemas/PublicLocalCodeRevision"
                          },
                          "repositoryUrl": {
                            "type": "string",
                            "maxLength": 200,
                            "pattern": "^https:\\/\\/github\\.com\\/[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}\\/(?!\\.{1,2}$)(?!.*\\.git$)[A-Za-z0-9._-]{1,100}$"
                          },
                          "repository": {
                            "type": "object",
                            "properties": {
                              "host": {
                                "type": "string",
                                "maxLength": 400,
                                "pattern": "^(?:[^@/\\s]+@)?[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$"
                              },
                              "owner": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_.-]{1,100}$"
                              },
                              "name": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_.-]{1,100}$"
                              }
                            },
                            "required": [
                              "host",
                              "owner",
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "patch": {
                            "type": "string",
                            "maxLength": 32768
                          },
                          "files": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "path": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 400
                                },
                                "added": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "removed": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "included": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "path",
                                "added",
                                "removed",
                                "included"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "truncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "base",
                          "head",
                          "patch",
                          "files",
                          "truncated"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "requestKey": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "name",
                  "hypothesis",
                  "requestKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs": {
      "post": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Register a local SDK run against frozen examples",
        "description": "Create or trigger public runs.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_runs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Local run slots and deadline",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "runId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string"
                        },
                        "deadlineAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "itemCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "runId",
                        "state",
                        "deadlineAt",
                        "itemCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "local": {
                    "$ref": "#/components/schemas/PublicLocalRunLink"
                  },
                  "datasetVersionId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "caseIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  },
                  "trials": {
                    "default": 1,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "grading": {
                    "type": "object",
                    "properties": {
                      "formVersionId": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "evaluatorIds": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      }
                    },
                    "required": [
                      "formVersionId",
                      "evaluatorIds"
                    ],
                    "additionalProperties": false
                  },
                  "deadlineSeconds": {
                    "default": 900,
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 3600
                  },
                  "params": {
                    "default": {},
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "checks": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  },
                  "baseline": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "gates": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "git": {
                    "type": "object",
                    "properties": {
                      "branch": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "sha": {
                        "type": "string",
                        "maxLength": 64
                      }
                    },
                    "required": [
                      "branch"
                    ],
                    "additionalProperties": false
                  },
                  "replay": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "const": "tools_only"
                          }
                        },
                        "required": [
                          "mode"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "const": "until_span"
                          },
                          "untilSpan": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        },
                        "required": [
                          "mode",
                          "untilSpan"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "selection": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "all"
                      },
                      "groupId": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "datasetId": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "digest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "totalCases": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2000
                      },
                      "batchOffset": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1999
                      },
                      "batchSize": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      }
                    },
                    "required": [
                      "kind",
                      "groupId",
                      "datasetId",
                      "digest",
                      "totalCases",
                      "batchOffset",
                      "batchSize"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "datasetVersionId",
                  "label",
                  "caseIds",
                  "grading"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/runs/{runId}": {
      "get": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Read local run and grading handoff progress",
        "description": "Fetch a specific public runs.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_runs_runId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Run progress without raw trace payloads",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicSdkRunStatus"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "includeGrading",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "includeGrading query parameter"
          },
          {
            "name": "includeCaseOutputProtocol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "true"
            },
            "description": "includeCaseOutputProtocol query parameter"
          },
          {
            "name": "includeDiagnostics",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "true"
            },
            "description": "includeDiagnostics query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/cancel": {
      "post": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Cancel a local task run while retaining accepted outputs",
        "description": "Create or trigger runs cancel.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_runs_runId_cancel",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Cancelled run progress",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicSdkRunStatus"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/comparison": {
      "get": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Read paired run grades and pass-rule summaries",
        "description": "Fetch a specific runs comparison.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_runs_runId_comparison",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Paired grades and full bounded question summaries",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "baseline",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "baseline query parameter"
          },
          {
            "name": "newFailuresOnly",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "newFailuresOnly query parameter"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1000
            },
            "description": "after query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/complete": {
      "post": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Finish output production and retain missing outputs as failures",
        "description": "Create or trigger runs complete.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_runs_runId_complete",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Sealed run progress",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicSdkRunStatus"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/detection-checks": {
      "get": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Read one page of per-case detection outcomes for a saved run or pinned batch",
        "description": "Fetch a specific runs detection-checks.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_runs_runId_detection_checks",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection outcomes and safe failure reasons",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batchId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "checks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "attemptId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "caseId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "traceId": {
                                "type": "string"
                              },
                              "detectionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "detectionName": {
                                "type": "string"
                              },
                              "revision": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "running",
                                  "succeeded",
                                  "failed",
                                  "skipped",
                                  "uncertain"
                                ]
                              },
                              "flagged": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "error": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "attemptId",
                              "caseId",
                              "traceId",
                              "detectionId",
                              "detectionName",
                              "revision",
                              "status",
                              "flagged",
                              "error"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "batchId",
                        "checks",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "batchId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId query parameter"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "after query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/gate": {
      "post": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Save a CI gate receipt using supplied or saved run expressions",
        "description": "Create or trigger runs gate.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_runs_runId_gate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Pass, fail or incomplete gate receipt",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "gates": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "baseline": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/outputs": {
      "post": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Accept a task output, task error, or finalized replay trace for one pinned case and trial",
        "description": "Create or trigger runs outputs.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_runs_runId_outputs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Immutable accepted output receipt",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "runId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "itemId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "outputId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "traceId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "succeeded",
                            "failed"
                          ]
                        }
                      },
                      "required": [
                        "runId",
                        "itemId",
                        "outputId",
                        "traceId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "caseId": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "trial": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10
                      },
                      "startedAt": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "endedAt": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "traceId": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{32}$"
                      }
                    },
                    "required": [
                      "caseId",
                      "trial",
                      "traceId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "caseId": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "trial": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10
                      },
                      "startedAt": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "endedAt": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "traceId": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{32}$"
                      },
                      "output": {},
                      "metrics": {
                        "default": {},
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      }
                    },
                    "required": [
                      "caseId",
                      "trial",
                      "output"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "caseId": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "trial": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10
                      },
                      "startedAt": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "endedAt": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "traceId": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{32}$"
                      },
                      "error": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "message": {
                            "type": "string",
                            "maxLength": 1000
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "additionalProperties": false
                      },
                      "metrics": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      }
                    },
                    "required": [
                      "caseId",
                      "trial",
                      "error"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/outputs/started": {
      "post": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Mark one pinned case and trial as running",
        "description": "Create or trigger outputs started.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_runs_runId_outputs_started",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Started case and trial",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "itemId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "startedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "itemId",
                        "startedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "caseId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "trial": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "startedAt": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "caseId",
                  "trial",
                  "startedAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/regrade": {
      "post": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Retry failed or never-graded outputs for a local run",
        "description": "Create or trigger runs regrade.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_runs_runId_regrade",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Frozen grading batches queued",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "runId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "regraded": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PublicUuid"
                          }
                        },
                        "sentNeverGraded": {
                          "type": "boolean"
                        },
                        "batchIds": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PublicUuid"
                          }
                        }
                      },
                      "required": [
                        "runId",
                        "regraded",
                        "sentNeverGraded",
                        "batchIds"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outputIds": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/runs/{runId}/tags": {
      "post": {
        "tags": [
          "public",
          "runs"
        ],
        "summary": "Tag a completed run as a dataset baseline",
        "description": "Create or trigger runs tags.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_runs_runId_tags",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Updated baseline tag",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "runId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "tag": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "runId",
                        "tag"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LocalTestingProblem400"
          },
          "401": {
            "$ref": "#/components/responses/LocalTestingProblem401"
          },
          "403": {
            "$ref": "#/components/responses/LocalTestingProblem403"
          },
          "404": {
            "$ref": "#/components/responses/LocalTestingProblem404"
          },
          "409": {
            "$ref": "#/components/responses/LocalTestingProblem409"
          },
          "413": {
            "$ref": "#/components/responses/LocalTestingProblem413"
          },
          "415": {
            "$ref": "#/components/responses/LocalTestingProblem415"
          },
          "422": {
            "$ref": "#/components/responses/LocalTestingProblem422"
          },
          "429": {
            "$ref": "#/components/responses/LocalTestingProblem429"
          },
          "500": {
            "$ref": "#/components/responses/LocalTestingProblem500"
          },
          "503": {
            "$ref": "#/components/responses/LocalTestingProblem503"
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tag": {
                    "type": "string",
                    "pattern": "^[\\w.-]{1,64}$"
                  }
                },
                "required": [
                  "tag"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/account/profile": {
      "get": {
        "tags": [
          "public",
          "account"
        ],
        "summary": "Get current public profile",
        "description": "List or read account profile.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_account_profile",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Current public profile",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "avatarConfigured": {
                          "type": "boolean"
                        },
                        "bio": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "companyName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "language": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 10
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "timezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255,
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "avatarConfigured",
                        "bio",
                        "companyName",
                        "language",
                        "name",
                        "timezone",
                        "websiteUrl"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "profile:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "account"
        ],
        "summary": "Update current public profile",
        "description": "Update safe profile fields. Repeating values already stored returns the current profile successfully without another update audit event. An empty patch remains invalid.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_account_profile",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Current public profile after update",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "avatarConfigured": {
                          "type": "boolean"
                        },
                        "bio": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "companyName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "language": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 10
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "timezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "websiteUrl": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255,
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "avatarConfigured",
                        "bio",
                        "companyName",
                        "language",
                        "name",
                        "timezone",
                        "websiteUrl"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "profile:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bio": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "timezone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/alert-history": {
      "get": {
        "tags": [
          "public",
          "alerts"
        ],
        "summary": "List alert fire history",
        "description": "List or read public alert-history.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_alert_history",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Alert fire history",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "alertHistory": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "channelsDelivered": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "in_app",
                                    "slack",
                                    "email",
                                    "webhook"
                                  ]
                                }
                              },
                              "count": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectionName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 100
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "firedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "investigationTarget": {
                                "anyOf": [
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "kind": {
                                            "type": "string",
                                            "const": "trace"
                                          },
                                          "traceId": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 255
                                          }
                                        },
                                        "required": [
                                          "kind",
                                          "traceId"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "detectionSlugs": {
                                            "maxItems": 100,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 100
                                            }
                                          },
                                          "from": {
                                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                          },
                                          "kind": {
                                            "type": "string",
                                            "const": "trace_search"
                                          },
                                          "to": {
                                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                          }
                                        },
                                        "required": [
                                          "detectionSlugs",
                                          "from",
                                          "kind",
                                          "to"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isFollowup": {
                                "type": "boolean"
                              },
                              "ruleId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "ruleName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "sampleTraceIds": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "sampleTraceIdsTotal": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "sampleTraceIdsTruncated": {
                                "type": "boolean"
                              },
                              "suppressedCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "threshold": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "windowMinutes": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "channelsDelivered",
                              "count",
                              "detectionName",
                              "firedAt",
                              "id",
                              "investigationTarget",
                              "isFollowup",
                              "ruleId",
                              "ruleName",
                              "sampleTraceIds",
                              "sampleTraceIdsTotal",
                              "sampleTraceIdsTruncated",
                              "suppressedCount",
                              "threshold",
                              "windowMinutes"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "alertHistory",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "alertRuleId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "alertRuleId query parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "endTime",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicOffsetTimestamp"
            },
            "description": "endTime query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicOffsetTimestamp"
            },
            "description": "startTime query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/alert-rules": {
      "get": {
        "tags": [
          "public",
          "alerts"
        ],
        "summary": "List alert rules",
        "description": "List or read public alert-rules.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_alert_rules",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Alert rules",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "alertRules": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "detectionId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectionName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 100
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "ruleType": {
                                "type": "string",
                                "enum": [
                                  "threshold",
                                  "per_event",
                                  "incident_created",
                                  "incident_per_event",
                                  "incident_threshold",
                                  "incident_metric_threshold",
                                  "incident_compound",
                                  "compound",
                                  "ingestion_health",
                                  "metric_threshold"
                                ]
                              },
                              "severity": {
                                "type": "string",
                                "enum": [
                                  "critical",
                                  "warning",
                                  "info"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "createdAt",
                              "detectionId",
                              "detectionName",
                              "enabled",
                              "id",
                              "name",
                              "ruleType",
                              "severity",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "alertRules",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "enabled",
            "in": "query",
            "required": false,
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "true",
                "false"
              ]
            },
            "description": "enabled query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "ruleType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "threshold",
                "per_event",
                "incident_created",
                "incident_per_event",
                "incident_threshold",
                "incident_metric_threshold",
                "incident_compound",
                "compound",
                "ingestion_health",
                "metric_threshold"
              ]
            },
            "description": "ruleType query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "alerts",
          "configuration"
        ],
        "summary": "Create an alert rule",
        "description": "Create or trigger public alert-rules.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_alert_rules",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Alert rule created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectionName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "ruleType": {
                          "type": "string",
                          "enum": [
                            "threshold",
                            "per_event",
                            "incident_created",
                            "incident_per_event",
                            "incident_threshold",
                            "incident_metric_threshold",
                            "incident_compound",
                            "compound",
                            "ingestion_health",
                            "metric_threshold"
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "critical",
                            "warning",
                            "info"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "channelMask": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            },
                            "webhookCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "email",
                            "slack",
                            "webhookCount"
                          ],
                          "additionalProperties": false
                        },
                        "conditions": {
                          "anyOf": [
                            {
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "detection": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "==",
                                      "<",
                                      "<="
                                    ]
                                  },
                                  "threshold": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "detection",
                                  "threshold"
                                ],
                                "additionalProperties": false
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "propertyFilters": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "incidentId": {
                                  "type": "string",
                                  "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                                },
                                "incidentTrigger": {
                                  "type": "string",
                                  "enum": [
                                    "created",
                                    "occurrence"
                                  ]
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "conditionsTotal": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "conditionsTruncated": {
                          "type": "boolean"
                        },
                        "conditionsLogicalOp": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "cooldownMinutes": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32768
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "descriptionTruncated": {
                          "type": "boolean"
                        },
                        "metricAggregation": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricDetectionFilter": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricOperator": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                ">=",
                                ">",
                                "==",
                                "<",
                                "<="
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricThresholdValue": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "silenceMinutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "thresholdCount": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "windowMinutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "detectionId",
                        "detectionName",
                        "enabled",
                        "id",
                        "name",
                        "ruleType",
                        "severity",
                        "updatedAt",
                        "channelMask",
                        "conditions",
                        "conditionsTotal",
                        "conditionsTruncated",
                        "conditionsLogicalOp",
                        "cooldownMinutes",
                        "description",
                        "descriptionTruncated",
                        "metricAggregation",
                        "metricDetectionFilter",
                        "metricName",
                        "metricOperator",
                        "metricThresholdValue",
                        "silenceMinutes",
                        "thresholdCount",
                        "windowMinutes"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Alert rule conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channelMask": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "email": {
                            "default": false,
                            "type": "boolean"
                          },
                          "slack": {
                            "default": false,
                            "type": "boolean"
                          },
                          "webhookIds": {
                            "default": [],
                            "maxItems": 1,
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/PublicUuid"
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "conditions": {
                    "anyOf": [
                      {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "detection": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "operator": {
                              "default": ">=",
                              "type": "string",
                              "enum": [
                                ">=",
                                ">",
                                "==",
                                "<",
                                "<="
                              ]
                            },
                            "threshold": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "detection",
                            "threshold"
                          ],
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "conditionsLogicalOp": {
                    "type": "string",
                    "enum": [
                      "AND",
                      "OR"
                    ]
                  },
                  "cooldownMinutes": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 525600
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32768
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "detectionId": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricAggregation": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "sum",
                          "avg",
                          "min",
                          "max",
                          "p95",
                          "p99",
                          "count",
                          "rate"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricDetectionFilter": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "cost",
                          "latency",
                          "error_rate",
                          "tokens_total",
                          "tokens_input",
                          "tokens_output",
                          "detection_rate",
                          "trace_count",
                          "tool_failure_rate",
                          "affected_executions",
                          "verified_executions",
                          "probable_executions",
                          "affected_rate",
                          "priority_score"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "propertyFilters": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "incidentId": {
                            "type": "string",
                            "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                          },
                          "incidentTrigger": {
                            "type": "string",
                            "enum": [
                              "created",
                              "occurrence"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricOperator": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          ">=",
                          ">",
                          "==",
                          "<",
                          "<="
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricThresholdValue": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "ruleType": {
                    "type": "string",
                    "enum": [
                      "threshold",
                      "per_event",
                      "incident_created",
                      "incident_per_event",
                      "incident_threshold",
                      "incident_metric_threshold",
                      "incident_compound",
                      "compound",
                      "ingestion_health",
                      "metric_threshold"
                    ]
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "critical",
                      "warning",
                      "info"
                    ]
                  },
                  "silenceMinutes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 525600
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "thresholdCount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 525600
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "windowMinutes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 525600
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "ruleType"
                ],
                "additionalProperties": false,
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "incident_created"
                      }
                    },
                    "required": [
                      "ruleType"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "incident_per_event"
                      },
                      "propertyFilters": {
                        "type": "object",
                        "properties": {
                          "incidentId": {
                            "type": "string",
                            "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                          },
                          "incidentTrigger": {
                            "type": "string",
                            "enum": [
                              "created",
                              "occurrence"
                            ]
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "incidentTrigger"
                        ]
                      }
                    },
                    "required": [
                      "ruleType",
                      "propertyFilters"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "incident_threshold"
                      },
                      "windowMinutes": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 15
                              },
                              {
                                "type": "number",
                                "const": 60
                              },
                              {
                                "type": "number",
                                "const": 1440
                              },
                              {
                                "type": "number",
                                "const": 10080
                              }
                            ]
                          }
                        ]
                      },
                      "thresholdCount": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 1000000
                          }
                        ]
                      }
                    },
                    "required": [
                      "ruleType",
                      "windowMinutes",
                      "thresholdCount"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "incident_metric_threshold"
                      },
                      "windowMinutes": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 15
                              },
                              {
                                "type": "number",
                                "const": 60
                              },
                              {
                                "type": "number",
                                "const": 1440
                              },
                              {
                                "type": "number",
                                "const": 10080
                              }
                            ]
                          }
                        ]
                      },
                      "metricName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "affected_executions",
                              "verified_executions",
                              "probable_executions",
                              "affected_rate",
                              "priority_score"
                            ]
                          }
                        ]
                      },
                      "metricOperator": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              ">=",
                              ">",
                              "==",
                              "<",
                              "<="
                            ]
                          }
                        ]
                      },
                      "metricThresholdValue": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0
                          }
                        ]
                      }
                    },
                    "required": [
                      "ruleType",
                      "windowMinutes",
                      "metricName",
                      "metricOperator",
                      "metricThresholdValue"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "incident_compound"
                      },
                      "windowMinutes": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 15
                              },
                              {
                                "type": "number",
                                "const": 60
                              },
                              {
                                "type": "number",
                                "const": 1440
                              },
                              {
                                "type": "number",
                                "const": 10080
                              }
                            ]
                          }
                        ]
                      },
                      "conditions": {
                        "type": "array",
                        "minItems": 2
                      }
                    },
                    "required": [
                      "ruleType",
                      "windowMinutes",
                      "conditions"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "threshold"
                      }
                    },
                    "required": [
                      "ruleType",
                      "detectionId",
                      "thresholdCount",
                      "windowMinutes"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "per_event"
                      }
                    },
                    "required": [
                      "ruleType",
                      "detectionId"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "compound"
                      }
                    },
                    "required": [
                      "ruleType",
                      "conditions"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ruleType": {
                        "const": "ingestion_health"
                      }
                    },
                    "required": [
                      "ruleType",
                      "silenceMinutes"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "metricName": {
                        "enum": [
                          "cost",
                          "latency",
                          "error_rate",
                          "tokens_total",
                          "tokens_input",
                          "tokens_output",
                          "trace_count",
                          "tool_failure_rate"
                        ]
                      },
                      "ruleType": {
                        "const": "metric_threshold"
                      }
                    },
                    "required": [
                      "ruleType",
                      "metricName",
                      "metricAggregation",
                      "metricOperator",
                      "metricThresholdValue"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "metricName": {
                        "const": "detection_rate"
                      },
                      "ruleType": {
                        "const": "metric_threshold"
                      }
                    },
                    "required": [
                      "ruleType",
                      "metricName",
                      "metricAggregation",
                      "metricOperator",
                      "metricThresholdValue",
                      "metricDetectionFilter"
                    ]
                  }
                ],
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "ruleType": {
                            "enum": [
                              "incident_created",
                              "incident_per_event",
                              "incident_threshold",
                              "incident_metric_threshold",
                              "incident_compound"
                            ]
                          },
                          "detectionId": {
                            "type": "null"
                          },
                          "detectionName": {
                            "type": "null"
                          },
                          "metricDetectionFilter": {
                            "type": "null"
                          },
                          "metricAggregation": {
                            "type": "null"
                          },
                          "propertyFilters": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "incidentId": {
                                    "type": "string",
                                    "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                                  },
                                  "incidentTrigger": {
                                    "type": "string",
                                    "enum": [
                                      "created",
                                      "occurrence"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "thresholdCount": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 1000000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "windowMinutes": {
                            "anyOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "const": 15
                                  },
                                  {
                                    "type": "number",
                                    "const": 60
                                  },
                                  {
                                    "type": "number",
                                    "const": 1440
                                  },
                                  {
                                    "type": "number",
                                    "const": 10080
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "cooldownMinutes": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 10080
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricName": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "affected_executions",
                                  "verified_executions",
                                  "probable_executions",
                                  "affected_rate",
                                  "priority_score"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricOperator": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  ">=",
                                  ">",
                                  "==",
                                  "<",
                                  "<="
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metricThresholdValue": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": 0
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "conditions": {
                            "anyOf": [
                              {
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "detection": {
                                      "type": "string",
                                      "enum": [
                                        "affected_executions",
                                        "verified_executions",
                                        "probable_executions",
                                        "affected_rate",
                                        "priority_score"
                                      ]
                                    },
                                    "operator": {
                                      "default": ">=",
                                      "type": "string",
                                      "enum": [
                                        ">=",
                                        ">",
                                        "==",
                                        "<",
                                        "<="
                                      ]
                                    },
                                    "threshold": {
                                      "type": "number",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "detection",
                                    "threshold"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "conditionsLogicalOp": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "AND",
                                  "OR"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "ruleType"
                        ],
                        "anyOf": [
                          {
                            "properties": {
                              "ruleType": {
                                "const": "incident_created"
                              }
                            }
                          },
                          {
                            "properties": {
                              "ruleType": {
                                "enum": [
                                  "incident_per_event",
                                  "incident_threshold",
                                  "incident_metric_threshold",
                                  "incident_compound"
                                ]
                              },
                              "cooldownMinutes": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 10080
                                  }
                                ]
                              },
                              "conditions": {
                                "anyOf": [
                                  {
                                    "maxItems": 10,
                                    "type": "array",
                                    "items": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "detection": {
                                              "type": "string",
                                              "enum": [
                                                "affected_executions",
                                                "verified_executions",
                                                "probable_executions"
                                              ]
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                ">=",
                                                ">",
                                                "==",
                                                "<",
                                                "<="
                                              ]
                                            },
                                            "threshold": {
                                              "type": "number",
                                              "minimum": 0
                                            }
                                          },
                                          "required": [
                                            "detection",
                                            "threshold"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "detection": {
                                              "type": "string",
                                              "enum": [
                                                "affected_rate",
                                                "priority_score"
                                              ]
                                            },
                                            "operator": {
                                              "type": "string",
                                              "enum": [
                                                ">=",
                                                ">",
                                                "==",
                                                "<",
                                                "<="
                                              ]
                                            },
                                            "threshold": {
                                              "type": "number",
                                              "minimum": 0,
                                              "maximum": 1
                                            }
                                          },
                                          "required": [
                                            "detection",
                                            "threshold"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "propertyFilters": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "incidentTrigger": {
                                            "type": "string",
                                            "const": "created"
                                          }
                                        },
                                        "required": [
                                          "incidentTrigger"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "incidentId": {
                                            "type": "string",
                                            "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                                          },
                                          "incidentTrigger": {
                                            "type": "string",
                                            "const": "occurrence"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "allOf": [
                              {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "metricName": {
                                        "enum": [
                                          "affected_executions",
                                          "verified_executions",
                                          "probable_executions",
                                          null
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "metricName"
                                    ],
                                    "properties": {
                                      "metricName": {
                                        "enum": [
                                          "affected_rate",
                                          "priority_score"
                                        ]
                                      },
                                      "metricThresholdValue": {
                                        "type": [
                                          "number",
                                          "null"
                                        ],
                                        "maximum": 1
                                      }
                                    }
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "ruleType": {
                            "enum": [
                              "threshold",
                              "per_event",
                              "compound",
                              "ingestion_health",
                              "metric_threshold"
                            ]
                          }
                        },
                        "required": [
                          "ruleType"
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/alert-rules/{alertRuleId}": {
      "delete": {
        "tags": [
          "public",
          "alerts",
          "configuration"
        ],
        "summary": "Delete an alert rule",
        "description": "Delete public alert-rules.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_alert_rules_alertRuleId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Alert rule deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "alertRuleId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "alertRuleId",
                        "deleted"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Alert rule not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "alertRuleId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "alerts"
        ],
        "summary": "Get an alert rule",
        "description": "Fetch a specific public alert-rules.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_alert_rules_alertRuleId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Alert rule",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectionName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "ruleType": {
                          "type": "string",
                          "enum": [
                            "threshold",
                            "per_event",
                            "incident_created",
                            "incident_per_event",
                            "incident_threshold",
                            "incident_metric_threshold",
                            "incident_compound",
                            "compound",
                            "ingestion_health",
                            "metric_threshold"
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "critical",
                            "warning",
                            "info"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "channelMask": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            },
                            "webhookCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "email",
                            "slack",
                            "webhookCount"
                          ],
                          "additionalProperties": false
                        },
                        "conditions": {
                          "anyOf": [
                            {
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "detection": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "==",
                                      "<",
                                      "<="
                                    ]
                                  },
                                  "threshold": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "detection",
                                  "threshold"
                                ],
                                "additionalProperties": false
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "propertyFilters": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "incidentId": {
                                  "type": "string",
                                  "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                                },
                                "incidentTrigger": {
                                  "type": "string",
                                  "enum": [
                                    "created",
                                    "occurrence"
                                  ]
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "conditionsTotal": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "conditionsTruncated": {
                          "type": "boolean"
                        },
                        "conditionsLogicalOp": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "cooldownMinutes": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32768
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "descriptionTruncated": {
                          "type": "boolean"
                        },
                        "metricAggregation": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricDetectionFilter": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricOperator": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                ">=",
                                ">",
                                "==",
                                "<",
                                "<="
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricThresholdValue": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "silenceMinutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "thresholdCount": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "windowMinutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "detectionId",
                        "detectionName",
                        "enabled",
                        "id",
                        "name",
                        "ruleType",
                        "severity",
                        "updatedAt",
                        "channelMask",
                        "conditions",
                        "conditionsTotal",
                        "conditionsTruncated",
                        "conditionsLogicalOp",
                        "cooldownMinutes",
                        "description",
                        "descriptionTruncated",
                        "metricAggregation",
                        "metricDetectionFilter",
                        "metricName",
                        "metricOperator",
                        "metricThresholdValue",
                        "silenceMinutes",
                        "thresholdCount",
                        "windowMinutes"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Alert rule not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "alertRuleId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "alerts",
          "configuration"
        ],
        "summary": "Update an alert rule",
        "description": "Partially update public alert-rules.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_alert_rules_alertRuleId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Alert rule updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectionName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "ruleType": {
                          "type": "string",
                          "enum": [
                            "threshold",
                            "per_event",
                            "incident_created",
                            "incident_per_event",
                            "incident_threshold",
                            "incident_metric_threshold",
                            "incident_compound",
                            "compound",
                            "ingestion_health",
                            "metric_threshold"
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "critical",
                            "warning",
                            "info"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "channelMask": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            },
                            "webhookCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "email",
                            "slack",
                            "webhookCount"
                          ],
                          "additionalProperties": false
                        },
                        "conditions": {
                          "anyOf": [
                            {
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "detection": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "==",
                                      "<",
                                      "<="
                                    ]
                                  },
                                  "threshold": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "detection",
                                  "threshold"
                                ],
                                "additionalProperties": false
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "propertyFilters": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "incidentId": {
                                  "type": "string",
                                  "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                                },
                                "incidentTrigger": {
                                  "type": "string",
                                  "enum": [
                                    "created",
                                    "occurrence"
                                  ]
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "conditionsTotal": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "conditionsTruncated": {
                          "type": "boolean"
                        },
                        "conditionsLogicalOp": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "cooldownMinutes": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32768
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "descriptionTruncated": {
                          "type": "boolean"
                        },
                        "metricAggregation": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricDetectionFilter": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricOperator": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                ">=",
                                ">",
                                "==",
                                "<",
                                "<="
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricThresholdValue": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "silenceMinutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "thresholdCount": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "windowMinutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "detectionId",
                        "detectionName",
                        "enabled",
                        "id",
                        "name",
                        "ruleType",
                        "severity",
                        "updatedAt",
                        "channelMask",
                        "conditions",
                        "conditionsTotal",
                        "conditionsTruncated",
                        "conditionsLogicalOp",
                        "cooldownMinutes",
                        "description",
                        "descriptionTruncated",
                        "metricAggregation",
                        "metricDetectionFilter",
                        "metricName",
                        "metricOperator",
                        "metricThresholdValue",
                        "silenceMinutes",
                        "thresholdCount",
                        "windowMinutes"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Alert rule not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Alert rule conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "alertRuleId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channelMask": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "email": {
                            "default": false,
                            "type": "boolean"
                          },
                          "slack": {
                            "default": false,
                            "type": "boolean"
                          },
                          "webhookIds": {
                            "default": [],
                            "maxItems": 1,
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/PublicUuid"
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "conditions": {
                    "anyOf": [
                      {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "detection": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "operator": {
                              "default": ">=",
                              "type": "string",
                              "enum": [
                                ">=",
                                ">",
                                "==",
                                "<",
                                "<="
                              ]
                            },
                            "threshold": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "detection",
                            "threshold"
                          ],
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "conditionsLogicalOp": {
                    "type": "string",
                    "enum": [
                      "AND",
                      "OR"
                    ]
                  },
                  "cooldownMinutes": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 525600
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32768
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "detectionId": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricAggregation": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "sum",
                          "avg",
                          "min",
                          "max",
                          "p95",
                          "p99",
                          "count",
                          "rate"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricDetectionFilter": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "cost",
                          "latency",
                          "error_rate",
                          "tokens_total",
                          "tokens_input",
                          "tokens_output",
                          "detection_rate",
                          "trace_count",
                          "tool_failure_rate",
                          "affected_executions",
                          "verified_executions",
                          "probable_executions",
                          "affected_rate",
                          "priority_score"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "propertyFilters": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "incidentId": {
                            "type": "string",
                            "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                          },
                          "incidentTrigger": {
                            "type": "string",
                            "enum": [
                              "created",
                              "occurrence"
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricOperator": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          ">=",
                          ">",
                          "==",
                          "<",
                          "<="
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metricThresholdValue": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "ruleType": {
                    "type": "string",
                    "enum": [
                      "threshold",
                      "per_event",
                      "incident_created",
                      "incident_per_event",
                      "incident_threshold",
                      "incident_metric_threshold",
                      "incident_compound",
                      "compound",
                      "ingestion_health",
                      "metric_threshold"
                    ]
                  },
                  "severity": {
                    "type": "string",
                    "enum": [
                      "critical",
                      "warning",
                      "info"
                    ]
                  },
                  "silenceMinutes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 525600
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "thresholdCount": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 525600
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "windowMinutes": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 525600
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/alert-rules/{alertRuleId}/history": {
      "get": {
        "tags": [
          "public",
          "alerts"
        ],
        "summary": "List alert rule change history",
        "description": "Fetch a specific alert-rules history.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_alert_rules_alertRuleId_history",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Privacy-safe alert rule change history",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "changedFields": {
                                "maxItems": 18,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "conditions",
                                    "conditionsLogicalOp",
                                    "cooldownMinutes",
                                    "description",
                                    "detectionId",
                                    "detectionName",
                                    "enabled",
                                    "metricAggregation",
                                    "metricDetectionFilter",
                                    "metricName",
                                    "metricOperator",
                                    "metricThresholdValue",
                                    "name",
                                    "ruleType",
                                    "severity",
                                    "silenceMinutes",
                                    "thresholdCount",
                                    "windowMinutes"
                                  ]
                                }
                              },
                              "changeType": {
                                "type": "string",
                                "enum": [
                                  "created",
                                  "deleted",
                                  "toggled",
                                  "updated"
                                ]
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "redactedChangesCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000
                              },
                              "redactedChangesTruncated": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "changedFields",
                              "changeType",
                              "createdAt",
                              "id",
                              "redactedChangesCount",
                              "redactedChangesTruncated"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "events",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Alert rule not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "alertRuleId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/alert-rules/{alertRuleId}/status": {
      "post": {
        "tags": [
          "public",
          "alerts",
          "configuration"
        ],
        "summary": "Set alert rule status",
        "description": "Create or trigger alert-rules status.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_alert_rules_alertRuleId_status",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Alert rule status updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectionName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "ruleType": {
                          "type": "string",
                          "enum": [
                            "threshold",
                            "per_event",
                            "incident_created",
                            "incident_per_event",
                            "incident_threshold",
                            "incident_metric_threshold",
                            "incident_compound",
                            "compound",
                            "ingestion_health",
                            "metric_threshold"
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "critical",
                            "warning",
                            "info"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "channelMask": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            },
                            "webhookCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "email",
                            "slack",
                            "webhookCount"
                          ],
                          "additionalProperties": false
                        },
                        "conditions": {
                          "anyOf": [
                            {
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "detection": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "operator": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "==",
                                      "<",
                                      "<="
                                    ]
                                  },
                                  "threshold": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "detection",
                                  "threshold"
                                ],
                                "additionalProperties": false
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "propertyFilters": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "incidentId": {
                                  "type": "string",
                                  "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|issue_[0-9a-f]{64})$"
                                },
                                "incidentTrigger": {
                                  "type": "string",
                                  "enum": [
                                    "created",
                                    "occurrence"
                                  ]
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "conditionsTotal": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "conditionsTruncated": {
                          "type": "boolean"
                        },
                        "conditionsLogicalOp": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "cooldownMinutes": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32768
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "descriptionTruncated": {
                          "type": "boolean"
                        },
                        "metricAggregation": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricDetectionFilter": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricOperator": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                ">=",
                                ">",
                                "==",
                                "<",
                                "<="
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metricThresholdValue": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "silenceMinutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "thresholdCount": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "windowMinutes": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "detectionId",
                        "detectionName",
                        "enabled",
                        "id",
                        "name",
                        "ruleType",
                        "severity",
                        "updatedAt",
                        "channelMask",
                        "conditions",
                        "conditionsTotal",
                        "conditionsTruncated",
                        "conditionsLogicalOp",
                        "cooldownMinutes",
                        "description",
                        "descriptionTruncated",
                        "metricAggregation",
                        "metricDetectionFilter",
                        "metricName",
                        "metricOperator",
                        "metricThresholdValue",
                        "silenceMinutes",
                        "thresholdCount",
                        "windowMinutes"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Alert rule not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "alertRuleId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/alert-rules/{alertRuleId}/test": {
      "post": {
        "tags": [
          "public",
          "alerts",
          "configuration"
        ],
        "summary": "Test or simulate an alert fire",
        "description": "Create or trigger alert-rules test.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_alert_rules_alertRuleId_test",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Alert test or simulation accepted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "alertRuleId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "channels": {
                          "maxItems": 3,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "channel": {
                                "type": "string",
                                "enum": [
                                  "email",
                                  "slack",
                                  "webhook"
                                ]
                              },
                              "outcome": {
                                "type": "string",
                                "enum": [
                                  "simulated",
                                  "queued"
                                ]
                              }
                            },
                            "required": [
                              "channel",
                              "outcome"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "dry_run",
                            "deliver"
                          ]
                        },
                        "testFireId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "webhookCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        }
                      },
                      "required": [
                        "alertRuleId",
                        "channels",
                        "mode",
                        "testFireId",
                        "webhookCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Alert rule not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertRuleId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "alertRuleId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "dry_run",
                      "deliver"
                    ]
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/analytics/chart": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics chart",
        "description": "Create or trigger analytics chart.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_chart",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics chart",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "buckets": {
                          "maxItems": 512,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "averageDurationMs": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detectionGroups": {
                                "type": "object",
                                "properties": {
                                  "negative": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000000
                                  },
                                  "neutral": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000000
                                  },
                                  "positive": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000000
                                  }
                                },
                                "required": [
                                  "negative",
                                  "neutral",
                                  "positive"
                                ],
                                "additionalProperties": false
                              },
                              "start": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "totalCostUsd": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000000
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "averageDurationMs",
                              "detectionGroups",
                              "start",
                              "totalCostUsd",
                              "traceCount"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "granularity": {
                          "type": "string",
                          "enum": [
                            "minute_5",
                            "hour",
                            "day"
                          ]
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "timezone": {
                          "type": "string",
                          "maxLength": 64
                        }
                      },
                      "required": [
                        "buckets",
                        "granularity",
                        "period",
                        "timezone"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "granularity": {
                    "type": "string",
                    "enum": [
                      "minute_5",
                      "hour",
                      "day"
                    ]
                  },
                  "timezone": {
                    "default": "UTC",
                    "type": "string"
                  }
                },
                "required": [
                  "from",
                  "to",
                  "granularity"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/cost": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics cost breakdown",
        "description": "Create or trigger analytics cost.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_cost",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics cost breakdown",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "breakdown": {
                          "type": "string",
                          "const": "cost"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "rows": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "totalCostUsd": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000000
                              },
                              "totalTokens": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000000
                              }
                            },
                            "required": [
                              "group",
                              "traceCount",
                              "totalCostUsd",
                              "totalTokens"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncation": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number",
                              "const": 100
                            },
                            "truncated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "limit",
                            "truncated"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "breakdown",
                        "period",
                        "rows",
                        "truncation"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/detections": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics detection breakdown",
        "description": "Create or trigger analytics detections.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_detections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics detection breakdown",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "breakdown": {
                          "type": "string",
                          "const": "detections"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "rows": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "hitCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "group",
                              "traceCount",
                              "hitCount"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncation": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number",
                              "const": 100
                            },
                            "truncated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "limit",
                            "truncated"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "breakdown",
                        "period",
                        "rows",
                        "truncation"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/errors": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics error breakdown",
        "description": "Create or trigger analytics errors.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_errors",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics error breakdown",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "breakdown": {
                          "type": "string",
                          "const": "errors"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "rows": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "errorCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "group",
                              "traceCount",
                              "errorCount"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncation": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number",
                              "const": 100
                            },
                            "truncated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "limit",
                            "truncated"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "breakdown",
                        "period",
                        "rows",
                        "truncation"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/export": {
      "post": {
        "tags": [
          "public",
          "analytics",
          "export"
        ],
        "summary": "Export bounded analytics rows",
        "description": "Create or trigger analytics export.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_export",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Complete bounded analytics export",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "dataset": {
                              "type": "string",
                              "const": "traces"
                            },
                            "endTime": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "rowCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 5000
                            },
                            "rows": {
                              "maxItems": 5000,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "completionTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "durationMs": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000000
                                  },
                                  "endedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "promptTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "sessionId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "spanCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "startedAt": {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  "status": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "totalCostUsd": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000000
                                  },
                                  "totalTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "workflowName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "completionTokens",
                                  "durationMs",
                                  "endedAt",
                                  "promptTokens",
                                  "sessionId",
                                  "spanCount",
                                  "startedAt",
                                  "status",
                                  "totalCostUsd",
                                  "totalTokens",
                                  "traceId",
                                  "workflowName"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "startTime": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "dataset",
                            "endTime",
                            "rowCount",
                            "rows",
                            "startTime"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "dataset": {
                              "type": "string",
                              "const": "spans"
                            },
                            "endTime": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "rowCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 5000
                            },
                            "rows": {
                              "maxItems": 5000,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "completionTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "costUsd": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000000
                                  },
                                  "durationMs": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000000
                                  },
                                  "endedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "framework": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "model": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "parentSpanId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "promptTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "provider": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "spanId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "spanName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "spanType": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 50
                                  },
                                  "startedAt": {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  "status": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "totalTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  }
                                },
                                "required": [
                                  "completionTokens",
                                  "costUsd",
                                  "durationMs",
                                  "endedAt",
                                  "framework",
                                  "model",
                                  "parentSpanId",
                                  "promptTokens",
                                  "provider",
                                  "spanId",
                                  "spanName",
                                  "spanType",
                                  "startedAt",
                                  "status",
                                  "totalTokens",
                                  "traceId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "startTime": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "dataset",
                            "endTime",
                            "rowCount",
                            "rows",
                            "startTime"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Analytics export exceeds complete response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "dataset": {
                        "type": "string",
                        "const": "traces"
                      },
                      "endTime": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "startTime": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "filters": {
                        "type": "object",
                        "properties": {
                          "sessionIds": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "statuses": {
                            "maxItems": 2,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "OK",
                                "ERROR"
                              ]
                            }
                          },
                          "traceIds": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "workflowNames": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "dataset",
                      "endTime",
                      "startTime"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "dataset": {
                        "type": "string",
                        "const": "spans"
                      },
                      "endTime": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "startTime": {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      "filters": {
                        "type": "object",
                        "properties": {
                          "sessionIds": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "statuses": {
                            "maxItems": 2,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "OK",
                                "ERROR"
                              ]
                            }
                          },
                          "traceIds": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "workflowNames": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "frameworks": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "models": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "providers": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "spanTypes": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "dataset",
                      "endTime",
                      "startTime"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/facets": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics facets",
        "description": "Create or trigger analytics facets.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_facets",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics facets",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "facets": {
                          "maxItems": 1,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "enum": [
                                  "workflowName",
                                  "detections",
                                  "sessionId",
                                  "status"
                                ]
                              },
                              "hasMore": {
                                "type": "boolean"
                              },
                              "options": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "count": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "label": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "value": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    }
                                  },
                                  "required": [
                                    "count",
                                    "label",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "field",
                              "hasMore",
                              "options"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "facets",
                        "period"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "fields": {
                    "minItems": 1,
                    "maxItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "workflowName",
                        "detections",
                        "sessionId",
                        "status"
                      ]
                    }
                  },
                  "limit": {
                    "default": 20,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  },
                  "search": {
                    "type": "string",
                    "maxLength": 100
                  }
                },
                "required": [
                  "from",
                  "to",
                  "fields"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/kpis": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics KPIs",
        "description": "Create or trigger analytics kpis.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_kpis",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics KPI summary",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "changePercent": {
                          "type": "object",
                          "properties": {
                            "averageDurationMs": {
                              "type": "number",
                              "minimum": -1000000,
                              "maximum": 1000000
                            },
                            "averageTokens": {
                              "type": "number",
                              "minimum": -1000000,
                              "maximum": 1000000
                            },
                            "detectionHitRate": {
                              "type": "number",
                              "minimum": -1000000,
                              "maximum": 1000000
                            },
                            "errorRate": {
                              "type": "number",
                              "minimum": -1000000,
                              "maximum": 1000000
                            },
                            "totalCostUsd": {
                              "type": "number",
                              "minimum": -1000000,
                              "maximum": 1000000
                            },
                            "traceCount": {
                              "type": "number",
                              "minimum": -1000000,
                              "maximum": 1000000
                            }
                          },
                          "required": [
                            "averageDurationMs",
                            "averageTokens",
                            "detectionHitRate",
                            "errorRate",
                            "totalCostUsd",
                            "traceCount"
                          ],
                          "additionalProperties": false
                        },
                        "current": {
                          "type": "object",
                          "properties": {
                            "averageDurationMs": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1000000000000000
                            },
                            "averageTokens": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1000000000000000
                            },
                            "detectionHitRate": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "errorRate": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "totalCostUsd": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1000000000000000
                            },
                            "traceCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "averageDurationMs",
                            "averageTokens",
                            "detectionHitRate",
                            "errorRate",
                            "totalCostUsd",
                            "traceCount"
                          ],
                          "additionalProperties": false
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "previous": {
                          "type": "object",
                          "properties": {
                            "averageDurationMs": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1000000000000000
                            },
                            "averageTokens": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1000000000000000
                            },
                            "detectionHitRate": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "errorRate": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "totalCostUsd": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1000000000000000
                            },
                            "traceCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "averageDurationMs",
                            "averageTokens",
                            "detectionHitRate",
                            "errorRate",
                            "totalCostUsd",
                            "traceCount"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "changePercent",
                        "current",
                        "period",
                        "previous"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/time": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics time breakdown",
        "description": "Create or trigger analytics time.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_time",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics time breakdown",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "breakdown": {
                          "type": "string",
                          "const": "time"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "rows": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "averageDurationMs": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000000
                              },
                              "totalDurationMs": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000000
                              }
                            },
                            "required": [
                              "group",
                              "traceCount",
                              "averageDurationMs",
                              "totalDurationMs"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncation": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number",
                              "const": 100
                            },
                            "truncated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "limit",
                            "truncated"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "breakdown",
                        "period",
                        "rows",
                        "truncation"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/tools": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics tool breakdown",
        "description": "Create or trigger analytics tools.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_tools",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics tool breakdown",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "breakdown": {
                          "type": "string",
                          "const": "tools"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "rows": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "averageDurationMs": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000000
                              },
                              "callCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "errorCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "group",
                              "traceCount",
                              "averageDurationMs",
                              "callCount",
                              "errorCount"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncation": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number",
                              "const": 100
                            },
                            "truncated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "limit",
                            "truncated"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "breakdown",
                        "period",
                        "rows",
                        "truncation"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/analytics/waste": {
      "post": {
        "tags": [
          "public",
          "analytics"
        ],
        "summary": "Query analytics waste breakdown",
        "description": "Create or trigger analytics waste.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_analytics_waste",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded analytics waste breakdown",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "breakdown": {
                          "type": "string",
                          "const": "waste"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "rows": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "group": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "hitCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "group",
                              "traceCount",
                              "hitCount"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncation": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number",
                              "const": 100
                            },
                            "truncated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "limit",
                            "truncated"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "breakdown",
                        "period",
                        "rows",
                        "truncation"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "object",
                    "properties": {
                      "detections": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "sessionIds": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "statuses": {
                        "maxItems": 2,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "OK",
                            "ERROR"
                          ]
                        }
                      },
                      "workflowNames": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/api-keys": {
      "get": {
        "tags": [
          "public",
          "access",
          "api-keys"
        ],
        "summary": "List API-key metadata",
        "description": "List or read public api-keys.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_api_keys",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded redacted API-key metadata page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "apiKeys": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "expiresAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "lastFour": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[A-Za-z0-9_-]{4}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastUsedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "prefix": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 24
                              },
                              "rateLimitPerMinute": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "scopeRegistryVersion": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "scopes": {
                                "maxItems": 64,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                }
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "expired",
                                  "inactive"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "createdAt",
                              "expiresAt",
                              "id",
                              "lastFour",
                              "lastUsedAt",
                              "name",
                              "prefix",
                              "rateLimitPerMinute",
                              "scopeRegistryVersion",
                              "scopes",
                              "state",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "legacyProjectKey": {
                          "type": "object",
                          "properties": {
                            "configured": {
                              "type": "boolean"
                            },
                            "kind": {
                              "type": "string",
                              "const": "legacy_project_key"
                            }
                          },
                          "required": [
                            "configured",
                            "kind"
                          ],
                          "additionalProperties": false
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "apiKeys",
                        "legacyProjectKey",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "access",
          "credentials"
        ],
        "summary": "Create a Public API key",
        "description": "Create or trigger public api-keys.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_api_keys",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Credential created; plaintext is returned once and client wrapped",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_api_keys"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "operationId",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{22}$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential lifecycle conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresInDays": {
                    "default": 90,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  },
                  "rateLimitPerMinute": {
                    "default": 60,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 600
                  },
                  "scopes": {
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "project:read",
                        "observability:read"
                      ]
                    },
                    "uniqueItems": true
                  }
                },
                "required": [
                  "name",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "writeOnly": true
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/api-keys/{credentialId}": {
      "delete": {
        "tags": [
          "public",
          "access",
          "credentials"
        ],
        "summary": "Revoke a Public API key",
        "description": "Delete public api-keys.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_api_keys_credentialId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Credential revoked",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "revokedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "state": {
                          "type": "string",
                          "const": "revoked"
                        }
                      },
                      "required": [
                        "id",
                        "revokedAt",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "credentialId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/public/api-keys/{credentialId}/rotate": {
      "post": {
        "tags": [
          "public",
          "access",
          "credentials"
        ],
        "summary": "Rotate a Public API key",
        "description": "Create or trigger api-keys rotate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_api_keys_credentialId_rotate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Credential created; plaintext is returned once and client wrapped",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_api_keys_credentialId_rotate"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "operationId",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{22}$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential lifecycle conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "credentialId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "writeOnly": true
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/coding-tools/connections": {
      "get": {
        "tags": [
          "public",
          "coding-tools",
          "configuration"
        ],
        "summary": "List coding-tool connections",
        "description": "List or read coding-tools connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_coding_tools_connections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted current-user coding-tool connections",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connections": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authMethod": {
                                "type": "string",
                                "enum": [
                                  "api_key",
                                  "azure",
                                  "bedrock",
                                  "subscription"
                                ]
                              },
                              "configured": {
                                "type": "boolean",
                                "const": true
                              },
                              "connectedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "connectionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "cursor",
                                  "claude_code",
                                  "codex"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "authMethod",
                              "configured",
                              "connectedAt",
                              "connectionId",
                              "createdAt",
                              "enabled",
                              "provider",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "connections",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "coding-tools",
          "configuration"
        ],
        "summary": "Connect a coding tool",
        "description": "Create or trigger coding-tools connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_coding_tools_connections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Coding-tool connection created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authMethod": {
                          "type": "string",
                          "enum": [
                            "api_key",
                            "azure",
                            "bedrock",
                            "subscription"
                          ]
                        },
                        "configured": {
                          "type": "boolean",
                          "const": true
                        },
                        "connectedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "provider": {
                          "type": "string",
                          "enum": [
                            "cursor",
                            "claude_code",
                            "codex"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "const": "coding_tool"
                        }
                      },
                      "required": [
                        "authMethod",
                        "configured",
                        "connectedAt",
                        "connectionId",
                        "enabled",
                        "provider",
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Coding-tool configuration is invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "authMethod": {
                        "type": "string",
                        "const": "api_key"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 8192,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "additionalProperties": false
                      },
                      "enabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "provider": {
                        "type": "string",
                        "const": "cursor"
                      }
                    },
                    "required": [
                      "authMethod",
                      "credentials",
                      "provider"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "authMethod": {
                        "type": "string",
                        "const": "subscription"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "oauthToken": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 8192,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "oauthToken"
                        ],
                        "additionalProperties": false
                      },
                      "enabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "provider": {
                        "type": "string",
                        "const": "claude_code"
                      }
                    },
                    "required": [
                      "authMethod",
                      "credentials",
                      "provider"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "authMethod": {
                        "type": "string",
                        "const": "api_key"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 8192,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "additionalProperties": false
                      },
                      "enabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "provider": {
                        "type": "string",
                        "const": "claude_code"
                      }
                    },
                    "required": [
                      "authMethod",
                      "credentials",
                      "provider"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "authMethod": {
                        "type": "string",
                        "const": "bedrock"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "awsAccessKeyId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 8192,
                            "writeOnly": true
                          },
                          "awsRegion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "awsSecretAccessKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 8192,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "awsAccessKeyId",
                          "awsRegion",
                          "awsSecretAccessKey"
                        ],
                        "additionalProperties": false
                      },
                      "enabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "provider": {
                        "type": "string",
                        "const": "claude_code"
                      }
                    },
                    "required": [
                      "authMethod",
                      "credentials",
                      "provider"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "authMethod": {
                        "type": "string",
                        "const": "api_key"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 8192,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "additionalProperties": false
                      },
                      "enabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "provider": {
                        "type": "string",
                        "const": "codex"
                      }
                    },
                    "required": [
                      "authMethod",
                      "credentials",
                      "provider"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "authMethod": {
                        "type": "string",
                        "const": "azure"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 8192,
                            "writeOnly": true
                          },
                          "apiVersion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "baseUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          },
                          "deploymentName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          }
                        },
                        "required": [
                          "apiKey",
                          "apiVersion",
                          "baseUrl",
                          "deploymentName"
                        ],
                        "additionalProperties": false
                      },
                      "enabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "provider": {
                        "type": "string",
                        "const": "codex"
                      }
                    },
                    "required": [
                      "authMethod",
                      "credentials",
                      "provider"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/coding-tools/connections/{connectionId}": {
      "delete": {
        "tags": [
          "public",
          "coding-tools",
          "configuration"
        ],
        "summary": "Disconnect a coding-tool connection",
        "description": "Delete coding-tools connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_coding_tools_connections_connectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Coding-tool connection disconnected",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "disconnected": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "connectionId",
                        "disconnected"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "public",
          "coding-tools",
          "configuration"
        ],
        "summary": "Update a coding-tool connection",
        "description": "Partially update coding-tools connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_coding_tools_connections_connectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Coding-tool connection updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authMethod": {
                          "type": "string",
                          "enum": [
                            "api_key",
                            "azure",
                            "bedrock",
                            "subscription"
                          ]
                        },
                        "configured": {
                          "type": "boolean",
                          "const": true
                        },
                        "connectedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "provider": {
                          "type": "string",
                          "enum": [
                            "cursor",
                            "claude_code",
                            "codex"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "const": "coding_tool"
                        }
                      },
                      "required": [
                        "authMethod",
                        "configured",
                        "connectedAt",
                        "connectionId",
                        "enabled",
                        "provider",
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Coding-tool configuration is invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "authMethod": {
                        "not": {},
                        "x-neatlogs-typescript-never": true
                      },
                      "credentials": {
                        "not": {},
                        "x-neatlogs-typescript-never": true
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "provider": {
                        "not": {},
                        "x-neatlogs-typescript-never": true
                      }
                    },
                    "required": [
                      "enabled"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "authMethod": {
                        "const": "api_key"
                      },
                      "credentials": {
                        "additionalProperties": false,
                        "properties": {
                          "apiKey": {
                            "maxLength": 8192,
                            "minLength": 1,
                            "type": "string",
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "type": "object"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "provider": {
                        "const": "cursor"
                      }
                    },
                    "required": [
                      "provider",
                      "authMethod",
                      "credentials"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "authMethod": {
                        "const": "subscription"
                      },
                      "credentials": {
                        "additionalProperties": false,
                        "properties": {
                          "oauthToken": {
                            "maxLength": 8192,
                            "minLength": 1,
                            "type": "string",
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "oauthToken"
                        ],
                        "type": "object"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "provider": {
                        "const": "claude_code"
                      }
                    },
                    "required": [
                      "provider",
                      "authMethod",
                      "credentials"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "authMethod": {
                        "const": "api_key"
                      },
                      "credentials": {
                        "additionalProperties": false,
                        "properties": {
                          "apiKey": {
                            "maxLength": 8192,
                            "minLength": 1,
                            "type": "string",
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "type": "object"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "provider": {
                        "const": "claude_code"
                      }
                    },
                    "required": [
                      "provider",
                      "authMethod",
                      "credentials"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "authMethod": {
                        "const": "bedrock"
                      },
                      "credentials": {
                        "additionalProperties": false,
                        "properties": {
                          "awsAccessKeyId": {
                            "maxLength": 8192,
                            "minLength": 1,
                            "type": "string",
                            "writeOnly": true
                          },
                          "awsRegion": {
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "awsSecretAccessKey": {
                            "maxLength": 8192,
                            "minLength": 1,
                            "type": "string",
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "awsAccessKeyId",
                          "awsRegion",
                          "awsSecretAccessKey"
                        ],
                        "type": "object"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "provider": {
                        "const": "claude_code"
                      }
                    },
                    "required": [
                      "provider",
                      "authMethod",
                      "credentials"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "authMethod": {
                        "const": "api_key"
                      },
                      "credentials": {
                        "additionalProperties": false,
                        "properties": {
                          "apiKey": {
                            "maxLength": 8192,
                            "minLength": 1,
                            "type": "string",
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "type": "object"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "provider": {
                        "const": "codex"
                      }
                    },
                    "required": [
                      "provider",
                      "authMethod",
                      "credentials"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "authMethod": {
                        "const": "azure"
                      },
                      "credentials": {
                        "additionalProperties": false,
                        "properties": {
                          "apiKey": {
                            "maxLength": 8192,
                            "minLength": 1,
                            "type": "string",
                            "writeOnly": true
                          },
                          "apiVersion": {
                            "maxLength": 255,
                            "minLength": 1,
                            "type": "string"
                          },
                          "baseUrl": {
                            "format": "uri",
                            "maxLength": 2048,
                            "type": "string"
                          },
                          "deploymentName": {
                            "maxLength": 255,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "apiKey",
                          "apiVersion",
                          "baseUrl",
                          "deploymentName"
                        ],
                        "type": "object"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "provider": {
                        "const": "codex"
                      }
                    },
                    "required": [
                      "provider",
                      "authMethod",
                      "credentials"
                    ],
                    "type": "object"
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/coding-tools/status": {
      "get": {
        "tags": [
          "public",
          "coding-tools",
          "configuration"
        ],
        "summary": "Get coding-tool configuration status",
        "description": "List or read coding-tools status.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_coding_tools_status",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted current-user coding-tool configuration status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "legacyCursorCredentialConfigured": {
                          "type": "boolean"
                        },
                        "providers": {
                          "minItems": 3,
                          "maxItems": 3,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "configured": {
                                "type": "boolean"
                              },
                              "hasRecordedRuns": {
                                "type": "boolean"
                              },
                              "lastConfiguredAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastRunAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "cursor",
                                  "claude_code",
                                  "codex"
                                ]
                              },
                              "recordedRunCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "configured",
                              "hasRecordedRuns",
                              "lastConfiguredAt",
                              "lastRunAt",
                              "provider",
                              "recordedRunCount"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "legacyCursorCredentialConfigured",
                        "providers"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/credential-migrations": {
      "post": {
        "tags": [
          "public",
          "access",
          "credential-migrations"
        ],
        "summary": "Create a privilege-nonexpanding credential migration",
        "description": "Create or trigger public credential-migrations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_credential_migrations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Credential migration preview created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "replacementCredentialId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replacementKind": {
                          "type": "string",
                          "enum": [
                            "project_ingest",
                            "public_api_key"
                          ]
                        },
                        "sourceCredentialId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "sourceKind": {
                          "type": "string",
                          "enum": [
                            "legacy_project_key",
                            "public_api_key"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "cancelled",
                            "cutover_pending",
                            "failed",
                            "previewed",
                            "replacement_issued",
                            "source_revoked"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "projectId",
                        "replacementCredentialId",
                        "replacementKind",
                        "sourceCredentialId",
                        "sourceKind",
                        "state",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential migration conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "replacement": {
                        "type": "object",
                        "properties": {
                          "expiresAt": {
                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                          },
                          "kind": {
                            "type": "string",
                            "const": "public_api_key"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "rateLimitPerMinute": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 600
                          },
                          "scopes": {
                            "minItems": 1,
                            "maxItems": 2,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "project:read",
                                "observability:read"
                              ]
                            }
                          }
                        },
                        "required": [
                          "expiresAt",
                          "kind",
                          "name",
                          "rateLimitPerMinute",
                          "scopes"
                        ],
                        "additionalProperties": false
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "credentialId": {
                            "$ref": "#/components/schemas/PublicUuid"
                          },
                          "kind": {
                            "type": "string",
                            "const": "public_api_key"
                          }
                        },
                        "required": [
                          "credentialId",
                          "kind"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "replacement",
                      "source"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "replacement": {
                        "type": "object",
                        "properties": {
                          "expiresAt": {
                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                          },
                          "kind": {
                            "type": "string",
                            "const": "project_ingest"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          }
                        },
                        "required": [
                          "expiresAt",
                          "kind",
                          "name"
                        ],
                        "additionalProperties": false
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "legacy_project_key"
                          },
                          "projectId": {
                            "$ref": "#/components/schemas/PublicUuid"
                          }
                        },
                        "required": [
                          "kind",
                          "projectId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "replacement",
                      "source"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/credential-migrations/{migrationId}": {
      "get": {
        "tags": [
          "public",
          "access",
          "credential-migrations"
        ],
        "summary": "Get a credential migration",
        "description": "Fetch a specific public credential-migrations.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_credential_migrations_migrationId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Credential migration state",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "replacementCredentialId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replacementKind": {
                          "type": "string",
                          "enum": [
                            "project_ingest",
                            "public_api_key"
                          ]
                        },
                        "sourceCredentialId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "sourceKind": {
                          "type": "string",
                          "enum": [
                            "legacy_project_key",
                            "public_api_key"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "cancelled",
                            "cutover_pending",
                            "failed",
                            "previewed",
                            "replacement_issued",
                            "source_revoked"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "projectId",
                        "replacementCredentialId",
                        "replacementKind",
                        "sourceCredentialId",
                        "sourceKind",
                        "state",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "migrationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "migrationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/credential-migrations/{migrationId}/cancel": {
      "post": {
        "tags": [
          "public",
          "access",
          "credential-migrations"
        ],
        "summary": "Cancel a credential migration",
        "description": "Create or trigger credential-migrations cancel.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_credential_migrations_migrationId_cancel",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Cancel a credential migration",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "replacementCredentialId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replacementKind": {
                          "type": "string",
                          "enum": [
                            "project_ingest",
                            "public_api_key"
                          ]
                        },
                        "sourceCredentialId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "sourceKind": {
                          "type": "string",
                          "enum": [
                            "legacy_project_key",
                            "public_api_key"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "cancelled",
                            "cutover_pending",
                            "failed",
                            "previewed",
                            "replacement_issued",
                            "source_revoked"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "projectId",
                        "replacementCredentialId",
                        "replacementKind",
                        "sourceCredentialId",
                        "sourceKind",
                        "state",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential migration conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "migrationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "migrationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/credential-migrations/{migrationId}/cutover": {
      "post": {
        "tags": [
          "public",
          "access",
          "credential-migrations"
        ],
        "summary": "Confirm credential migration cutover",
        "description": "Create or trigger credential-migrations cutover.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_credential_migrations_migrationId_cutover",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Confirm credential migration cutover",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "replacementCredentialId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replacementKind": {
                          "type": "string",
                          "enum": [
                            "project_ingest",
                            "public_api_key"
                          ]
                        },
                        "sourceCredentialId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "sourceKind": {
                          "type": "string",
                          "enum": [
                            "legacy_project_key",
                            "public_api_key"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "cancelled",
                            "cutover_pending",
                            "failed",
                            "previewed",
                            "replacement_issued",
                            "source_revoked"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "projectId",
                        "replacementCredentialId",
                        "replacementKind",
                        "sourceCredentialId",
                        "sourceKind",
                        "state",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential migration conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "migrationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "migrationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/credential-migrations/{migrationId}/replacement": {
      "post": {
        "tags": [
          "public",
          "access",
          "credential-migrations"
        ],
        "summary": "Issue a credential migration replacement",
        "description": "Create or trigger credential-migrations replacement.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_credential_migrations_migrationId_replacement",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Migration replacement issued; plaintext is client wrapped once",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_credential_migrations_migrationId_replacement"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "operationId",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{22}$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential migration conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "migrationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "migrationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "writeOnly": true
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/credential-migrations/{migrationId}/revoke-source": {
      "post": {
        "tags": [
          "public",
          "access",
          "credential-migrations"
        ],
        "summary": "Revoke a migrated source credential",
        "description": "Create or trigger credential-migrations revoke-source.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_credential_migrations_migrationId_revoke_source",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Revoke a migrated source credential",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "replacementCredentialId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "replacementKind": {
                          "type": "string",
                          "enum": [
                            "project_ingest",
                            "public_api_key"
                          ]
                        },
                        "sourceCredentialId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "sourceKind": {
                          "type": "string",
                          "enum": [
                            "legacy_project_key",
                            "public_api_key"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "cancelled",
                            "cutover_pending",
                            "failed",
                            "previewed",
                            "replacement_issued",
                            "source_revoked"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "projectId",
                        "replacementCredentialId",
                        "replacementKind",
                        "sourceCredentialId",
                        "sourceKind",
                        "state",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential migration conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "migrationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "migrationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/credential-migrations/legacy-compatibility": {
      "get": {
        "tags": [
          "public",
          "access",
          "credential-migrations"
        ],
        "summary": "Get legacy compatibility retirement readiness",
        "description": "List or read credential-migrations legacy-compatibility.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_credential_migrations_legacy_compatibility",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Privacy-safe legacy compatibility readiness",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "blockers": {
                          "maxItems": 8,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "customer_outreach_incomplete",
                              "evidence_unhealthy",
                              "product_approval_missing",
                              "replacement_linkage_missing",
                              "security_approval_missing",
                              "zero_success_window_has_success",
                              "zero_success_window_missing",
                              "zero_success_window_unreviewed"
                            ]
                          }
                        },
                        "evidenceHealthy": {
                          "type": "boolean"
                        },
                        "lastSuccessAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "outreachComplete": {
                          "type": "boolean"
                        },
                        "productApprovedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "ready": {
                          "type": "boolean"
                        },
                        "replacementLinked": {
                          "type": "boolean"
                        },
                        "reviewedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "securityApprovedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "successCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "windowEndedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "windowStartedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "blockers",
                        "evidenceHealthy",
                        "lastSuccessAt",
                        "outreachComplete",
                        "productApprovedAt",
                        "projectId",
                        "ready",
                        "replacementLinked",
                        "reviewedAt",
                        "securityApprovedAt",
                        "successCount",
                        "windowEndedAt",
                        "windowStartedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/credentials/emergency-revocations": {
      "post": {
        "tags": [
          "public",
          "access",
          "credentials"
        ],
        "summary": "Emergency revoke managed credentials atomically",
        "description": "Create or trigger credentials emergency-revocations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_credentials_emergency_revocations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Managed credentials revoked atomically",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "credentials": {
                          "minItems": 1,
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "credentialId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "project_ingest",
                                  "public_api_key"
                                ]
                              },
                              "revokedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "state": {
                                "type": "string",
                                "const": "revoked"
                              }
                            },
                            "required": [
                              "credentialId",
                              "kind",
                              "revokedAt",
                              "state"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "credentials",
                        "schemaVersion"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential revocation conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requests": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "confirmation": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "credentialId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "project_ingest",
                            "public_api_key"
                          ]
                        }
                      },
                      "required": [
                        "confirmation",
                        "credentialId",
                        "kind"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "requests"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/dataset-capture-jobs": {
      "get": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "List the 50 most recent dataset captures",
        "description": "List or read public dataset-capture-jobs.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_dataset_capture_jobs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Recent capture jobs, newest first, capped at 50",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "jobs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "datasetId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "recording",
                                  "queued",
                                  "running",
                                  "needs_review",
                                  "completed",
                                  "cancelled",
                                  "failed"
                                ]
                              },
                              "totalCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "capturedCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "skippedCount": {
                                "default": 0,
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "failedCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "pendingCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "capturedBytes": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "datasetVersionId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "canRetry": {
                                "type": "boolean"
                              },
                              "publicationError": {
                                "default": null,
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "datasetId",
                              "state",
                              "totalCount",
                              "capturedCount",
                              "skippedCount",
                              "failedCount",
                              "pendingCount",
                              "capturedBytes",
                              "datasetVersionId",
                              "createdAt",
                              "updatedAt",
                              "canRetry",
                              "publicationError"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "jobs"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset, version, case, or capture job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset capture is not published yet",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Register SDK dataset capture before execution (one-hour recording deadline)",
        "description": "Create or trigger public dataset-capture-jobs.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_dataset_capture_jobs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Durable capture receipt; poll the job for publication",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "captureId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "datasetId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "recording",
                            "queued",
                            "running",
                            "needs_review",
                            "completed",
                            "failed",
                            "cancelled"
                          ]
                        }
                      },
                      "required": [
                        "captureId",
                        "datasetId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset or SDK capture not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset name is ambiguous or capture has already been sealed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "destination": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "existing"
                          },
                          "datasetId": {
                            "$ref": "#/components/schemas/PublicUuid"
                          }
                        },
                        "required": [
                          "kind",
                          "datasetId"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "name"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "createIfMissing": {
                            "default": false,
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "required": [
                          "kind",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "destination"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/dataset-capture-jobs/{jobId}": {
      "get": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Get dataset capture progress and a page of failures",
        "description": "Fetch a specific public dataset-capture-jobs.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_dataset_capture_jobs_jobId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Capture progress and failures; pass nextCursor as after for the next failure page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "job": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "datasetId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "recording",
                                "queued",
                                "running",
                                "needs_review",
                                "completed",
                                "cancelled",
                                "failed"
                              ]
                            },
                            "totalCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "capturedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "skippedCount": {
                              "default": 0,
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "failedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "pendingCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "capturedBytes": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "datasetVersionId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "canRetry": {
                              "type": "boolean"
                            },
                            "publicationError": {
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "datasetId",
                            "state",
                            "totalCount",
                            "capturedCount",
                            "skippedCount",
                            "failedCount",
                            "pendingCount",
                            "capturedBytes",
                            "datasetVersionId",
                            "createdAt",
                            "updatedAt",
                            "canRetry",
                            "publicationError"
                          ],
                          "additionalProperties": false
                        },
                        "failures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "position": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "source": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "session"
                                      },
                                      "sessionId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "membershipFrozenAt": {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      "members": {
                                        "minItems": 1,
                                        "maxItems": 100,
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "traceId": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 255
                                            },
                                            "startedAt": {
                                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                                            }
                                          },
                                          "required": [
                                            "traceId",
                                            "startedAt"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "window": {
                                        "type": "object",
                                        "properties": {
                                          "from": {
                                            "$ref": "#/components/schemas/PublicUtcTimestamp"
                                          },
                                          "to": {
                                            "$ref": "#/components/schemas/PublicUtcTimestamp"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "sessionId",
                                      "membershipFrozenAt",
                                      "members"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "import"
                                      }
                                    },
                                    "required": [
                                      "kind"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "trace"
                                      },
                                      "traceId": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "traceId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "span"
                                      },
                                      "traceId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "spanId": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "traceId",
                                      "spanId"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "retryable": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "retryable"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "position",
                              "source",
                              "error"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "job",
                        "failures",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset, version, case, or capture job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset capture is not published yet",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "default": -1,
              "type": "integer",
              "minimum": -1,
              "maximum": 2000
            },
            "description": "after query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/dataset-capture-jobs/{jobId}/abort": {
      "post": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Abort an unfinished SDK recording without publishing cases",
        "description": "Create or trigger dataset-capture-jobs abort.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_dataset_capture_jobs_jobId_abort",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Durable capture receipt; poll the job for publication",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "captureId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "datasetId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "recording",
                            "queued",
                            "running",
                            "needs_review",
                            "completed",
                            "failed",
                            "cancelled"
                          ]
                        }
                      },
                      "required": [
                        "captureId",
                        "datasetId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset or SDK capture not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset name is ambiguous or capture has already been sealed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "export_failed",
                      "incomplete_execution",
                      "cancelled"
                    ]
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/dataset-capture-jobs/{jobId}/complete": {
      "post": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Seal SDK trace evidence and queue capture (64 KiB request limit)",
        "description": "Create or trigger dataset-capture-jobs complete.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_dataset_capture_jobs_jobId_complete",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Durable capture receipt; poll the job for publication",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "captureId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "datasetId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "recording",
                            "queued",
                            "running",
                            "needs_review",
                            "completed",
                            "failed",
                            "cancelled"
                          ]
                        }
                      },
                      "required": [
                        "captureId",
                        "datasetId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset or SDK capture not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset name is ambiguous or capture has already been sealed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "traces": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "traceId": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{32}$"
                        },
                        "spanIds": {
                          "minItems": 1,
                          "maxItems": 5000,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{16}$"
                          }
                        }
                      },
                      "required": [
                        "traceId",
                        "spanIds"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "traces"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/datasets": {
      "get": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "List one page of published datasets",
        "description": "List or read public datasets.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_datasets",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Up to 500 published datasets, newest first. Send Prefer: pagination=cursor to receive nextCursor, then pass it as before to continue. Without negotiation, returns the legacy datasets-only response.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "datasets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "latestVersionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "version": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "caseCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "description",
                              "latestVersionId",
                              "version",
                              "caseCount",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "datasets"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset, version, case, or capture job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset capture is not published yet",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "before query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          },
          {
            "name": "prefer",
            "in": "header",
            "required": false,
            "schema": {
              "description": "Send pagination=cursor to receive nextCursor. Other preferences are ignored.",
              "type": "string"
            },
            "description": "prefer header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Create a dataset from imported cases (64 KiB request limit)",
        "description": "Create or trigger public datasets.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_datasets",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Published dataset and immutable version IDs",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "datasetId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "versionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "datasetId",
                        "versionId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset, version, or case not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset version or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "idempotencyKey": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "cases": {
                    "default": [],
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "caseId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "revisionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "input": {
                          "default": null
                        },
                        "observedOutput": {
                          "default": null
                        },
                        "expected": {
                          "default": null,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "value": {},
                                "answers": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "draft",
                                    "verified"
                                  ]
                                },
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "human",
                                    "captured_output",
                                    "import",
                                    "ai",
                                    "eval",
                                    "golden_update"
                                  ]
                                },
                                "verifiedBy": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 320
                                },
                                "verifiedAt": {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                "evaluationId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "responseId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "generation": {
                                  "type": "object",
                                  "properties": {
                                    "model": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "generatedAt": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    "caseRevisionId": {
                                      "$ref": "#/components/schemas/PublicUuid"
                                    },
                                    "evidenceHash": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "promptVersion": {
                                      "type": "string",
                                      "const": "dataset-expected.v1"
                                    }
                                  },
                                  "required": [
                                    "model",
                                    "generatedAt",
                                    "caseRevisionId",
                                    "evidenceHash",
                                    "promptVersion"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "value",
                                "status",
                                "source"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "acceptanceCriteria": {
                          "default": null,
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "items": {
                                  "minItems": 1,
                                  "maxItems": 50,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      "description": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 2000
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "description"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "draft",
                                    "verified"
                                  ]
                                },
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "human",
                                    "ai",
                                    "import"
                                  ]
                                },
                                "generation": {
                                  "type": "object",
                                  "properties": {
                                    "model": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "generatedAt": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    "caseRevisionId": {
                                      "$ref": "#/components/schemas/PublicUuid"
                                    },
                                    "evidenceHash": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "promptVersion": {
                                      "type": "string",
                                      "const": "dataset-criteria.v1"
                                    }
                                  },
                                  "required": [
                                    "model",
                                    "generatedAt",
                                    "caseRevisionId",
                                    "evidenceHash",
                                    "promptVersion"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "items",
                                "status",
                                "source"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "context": {
                          "default": null
                        },
                        "metadata": {
                          "default": {},
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "tags": {
                          "default": [],
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 255
                          }
                        },
                        "source": {
                          "default": {
                            "kind": "import"
                          },
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "session"
                                },
                                "sessionId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "membershipFrozenAt": {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                "members": {
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "traceId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "startedAt": {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      }
                                    },
                                    "required": [
                                      "traceId",
                                      "startedAt"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "window": {
                                  "type": "object",
                                  "properties": {
                                    "from": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    "to": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "kind",
                                "sessionId",
                                "membershipFrozenAt",
                                "members"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "import"
                                }
                              },
                              "required": [
                                "kind"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "trace"
                                },
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "kind",
                                "traceId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "span"
                                },
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "spanId": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "kind",
                                "traceId",
                                "spanId"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "metrics": {
                          "default": {},
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "experimentId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "name",
                  "idempotencyKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/datasets/{datasetId}": {
      "get": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Get dataset version metadata",
        "description": "Fetch a specific public datasets.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_datasets_datasetId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Version metadata; use its version ID to page through frozen cases",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "dataset": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "latestVersionId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "caseCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "description",
                            "latestVersionId",
                            "version",
                            "caseCount",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        },
                        "version": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            }
                          },
                          "required": [
                            "id",
                            "version",
                            "createdAt"
                          ],
                          "additionalProperties": false
                        },
                        "versions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "version": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "id",
                              "version",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "dataset",
                        "version",
                        "versions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset, version, case, or capture job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset capture is not published yet",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "datasetId path parameter"
          },
          {
            "name": "versionId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "versionId query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/datasets/{datasetId}/cases": {
      "get": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Page through case previews in a pinned dataset version",
        "description": "Fetch a specific datasets cases.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_datasets_datasetId_cases",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded case previews; versionId is required for stable pagination",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cases": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "caseId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "revisionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "displayName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "inputPreview": {
                                "type": "string"
                              },
                              "observedOutputPreview": {
                                "type": "string"
                              },
                              "expectedStatus": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "draft",
                                      "verified"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "hasExpected": {
                                "type": "boolean"
                              },
                              "criteriaStatus": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "draft",
                                      "verified"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "criteriaCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "source": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "session"
                                      },
                                      "sessionId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "membershipFrozenAt": {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      "members": {
                                        "minItems": 1,
                                        "maxItems": 100,
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "traceId": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 255
                                            },
                                            "startedAt": {
                                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                                            }
                                          },
                                          "required": [
                                            "traceId",
                                            "startedAt"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "window": {
                                        "type": "object",
                                        "properties": {
                                          "from": {
                                            "$ref": "#/components/schemas/PublicUtcTimestamp"
                                          },
                                          "to": {
                                            "$ref": "#/components/schemas/PublicUtcTimestamp"
                                          }
                                        },
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "sessionId",
                                      "membershipFrozenAt",
                                      "members"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "import"
                                      }
                                    },
                                    "required": [
                                      "kind"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "trace"
                                      },
                                      "traceId": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "traceId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "span"
                                      },
                                      "traceId": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "spanId": {
                                        "type": "string",
                                        "minLength": 1
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "traceId",
                                      "spanId"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "required": [
                              "caseId",
                              "revisionId",
                              "position",
                              "displayName",
                              "inputPreview",
                              "observedOutputPreview",
                              "expectedStatus",
                              "hasExpected",
                              "criteriaStatus",
                              "criteriaCount",
                              "source"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "cases",
                        "total"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset, version, case, or capture job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset capture is not published yet",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "datasetId path parameter"
          },
          {
            "name": "versionId",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "versionId query parameter"
          },
          {
            "name": "caseIds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "caseIds query parameter"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 2000
            },
            "description": "offset query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/datasets/{datasetId}/cases/{caseId}": {
      "get": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Get one complete frozen dataset case",
        "description": "Fetch a specific datasets cases.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_datasets_datasetId_cases_caseId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "One complete case including frozen evidence, at most 16 MiB",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$schema": "https://json-schema.org/draft/2020-12/schema",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "case": {
                          "type": "object",
                          "properties": {
                            "caseId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "revisionId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "input": {
                              "default": null
                            },
                            "observedOutput": {
                              "default": null
                            },
                            "expected": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "value": {},
                                    "answers": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {}
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "draft",
                                        "verified"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "human",
                                        "captured_output",
                                        "import",
                                        "ai",
                                        "eval",
                                        "golden_update"
                                      ]
                                    },
                                    "verifiedBy": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 320
                                    },
                                    "verifiedAt": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    "evaluationId": {
                                      "$ref": "#/components/schemas/PublicUuid"
                                    },
                                    "responseId": {
                                      "$ref": "#/components/schemas/PublicUuid"
                                    },
                                    "generation": {
                                      "type": "object",
                                      "properties": {
                                        "model": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 255
                                        },
                                        "generatedAt": {
                                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                                        },
                                        "caseRevisionId": {
                                          "$ref": "#/components/schemas/PublicUuid"
                                        },
                                        "evidenceHash": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "promptVersion": {
                                          "type": "string",
                                          "const": "dataset-expected.v1"
                                        }
                                      },
                                      "required": [
                                        "model",
                                        "generatedAt",
                                        "caseRevisionId",
                                        "evidenceHash",
                                        "promptVersion"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "value",
                                    "status",
                                    "source"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "acceptanceCriteria": {
                              "default": null,
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "items": {
                                      "minItems": 1,
                                      "maxItems": 50,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "$ref": "#/components/schemas/PublicUuid"
                                          },
                                          "description": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 2000
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "description"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "draft",
                                        "verified"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "human",
                                        "ai",
                                        "import"
                                      ]
                                    },
                                    "generation": {
                                      "type": "object",
                                      "properties": {
                                        "model": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 255
                                        },
                                        "generatedAt": {
                                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                                        },
                                        "caseRevisionId": {
                                          "$ref": "#/components/schemas/PublicUuid"
                                        },
                                        "evidenceHash": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "promptVersion": {
                                          "type": "string",
                                          "const": "dataset-criteria.v1"
                                        }
                                      },
                                      "required": [
                                        "model",
                                        "generatedAt",
                                        "caseRevisionId",
                                        "evidenceHash",
                                        "promptVersion"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "items",
                                    "status",
                                    "source"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "context": {
                              "default": null
                            },
                            "metadata": {
                              "default": {},
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            "tags": {
                              "default": [],
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 255
                              }
                            },
                            "source": {
                              "default": {
                                "kind": "import"
                              },
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "session"
                                    },
                                    "sessionId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "membershipFrozenAt": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    "members": {
                                      "minItems": 1,
                                      "maxItems": 100,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "traceId": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 255
                                          },
                                          "startedAt": {
                                            "$ref": "#/components/schemas/PublicUtcTimestamp"
                                          }
                                        },
                                        "required": [
                                          "traceId",
                                          "startedAt"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "window": {
                                      "type": "object",
                                      "properties": {
                                        "from": {
                                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                                        },
                                        "to": {
                                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "sessionId",
                                    "membershipFrozenAt",
                                    "members"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "import"
                                    }
                                  },
                                  "required": [
                                    "kind"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "trace"
                                    },
                                    "traceId": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "traceId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "const": "span"
                                    },
                                    "traceId": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "spanId": {
                                      "type": "string",
                                      "minLength": 1
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "traceId",
                                    "spanId"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            "metrics": {
                              "default": {},
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "caseId",
                            "revisionId",
                            "input",
                            "observedOutput",
                            "expected",
                            "acceptanceCriteria",
                            "context",
                            "metadata",
                            "tags",
                            "source",
                            "metrics"
                          ],
                          "additionalProperties": false
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "case",
                        "position"
                      ],
                      "additionalProperties": false
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    }
                  },
                  "required": [
                    "data",
                    "success",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset, version, case, or capture job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset capture is not published yet",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "datasetId path parameter"
          },
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "caseId path parameter"
          },
          {
            "name": "versionId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "versionId query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/datasets/{datasetId}/versions": {
      "post": {
        "tags": [
          "public",
          "datasets"
        ],
        "summary": "Publish expected outcomes, supporting context, or case removals (64 KiB request limit)",
        "description": "Create or trigger datasets versions.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_datasets_datasetId_versions",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Published dataset and immutable version IDs",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "datasetId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "versionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "datasetId",
                        "versionId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Dataset, version, or case not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Dataset version or idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "datasetId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "baseVersionId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "idempotencyKey": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "expectedChanges": {
                    "default": [],
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "caseId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "revisionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "expected": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "value": {},
                                "answers": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "draft",
                                    "verified"
                                  ]
                                },
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "human",
                                    "captured_output",
                                    "import",
                                    "ai",
                                    "eval",
                                    "golden_update"
                                  ]
                                },
                                "verifiedBy": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 320
                                },
                                "verifiedAt": {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                "evaluationId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "responseId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "generation": {
                                  "type": "object",
                                  "properties": {
                                    "model": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "generatedAt": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    "caseRevisionId": {
                                      "$ref": "#/components/schemas/PublicUuid"
                                    },
                                    "evidenceHash": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "promptVersion": {
                                      "type": "string",
                                      "const": "dataset-expected.v1"
                                    }
                                  },
                                  "required": [
                                    "model",
                                    "generatedAt",
                                    "caseRevisionId",
                                    "evidenceHash",
                                    "promptVersion"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "value",
                                "status",
                                "source"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "acceptanceCriteria": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "items": {
                                  "minItems": 1,
                                  "maxItems": 50,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      "description": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 2000
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "description"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "draft",
                                    "verified"
                                  ]
                                },
                                "source": {
                                  "type": "string",
                                  "enum": [
                                    "human",
                                    "ai",
                                    "import"
                                  ]
                                },
                                "generation": {
                                  "type": "object",
                                  "properties": {
                                    "model": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "generatedAt": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    "caseRevisionId": {
                                      "$ref": "#/components/schemas/PublicUuid"
                                    },
                                    "evidenceHash": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "promptVersion": {
                                      "type": "string",
                                      "const": "dataset-criteria.v1"
                                    }
                                  },
                                  "required": [
                                    "model",
                                    "generatedAt",
                                    "caseRevisionId",
                                    "evidenceHash",
                                    "promptVersion"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "items",
                                "status",
                                "source"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "context": {
                          "type": "object",
                          "properties": {
                            "instructions": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 16000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "references": {}
                          },
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "caseId",
                        "revisionId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "removedCaseIds": {
                    "default": [],
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  }
                },
                "required": [
                  "baseVersionId",
                  "idempotencyKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-authoring": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Prepare an OAuth user draft or execute a reviewed service-account authoring action",
        "description": "Create or trigger public detection-authoring.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_authoring",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prepared inactive actor-bound draft",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PublicDetectionDraft"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "draftId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "status": {
                              "type": "string"
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "fingerprint": {
                              "type": "string",
                              "minLength": 64,
                              "maxLength": 64
                            },
                            "approvalFingerprint": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 64,
                                  "maxLength": 64
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detectionId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "backfillKey": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "draftId",
                            "status",
                            "revision",
                            "fingerprint",
                            "approvalFingerprint",
                            "detectionId",
                            "error",
                            "backfillKey"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Draft or request changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection authoring discovery unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "goal": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8000
                      },
                      "displayName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8000
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "classifier",
                          "regex",
                          "conditional",
                          "pii",
                          "custom_trained",
                          "code",
                          "trace_rules",
                          "decision"
                        ]
                      },
                      "sentiment": {
                        "default": "negative",
                        "type": "string",
                        "enum": [
                          "negative",
                          "positive",
                          "neutral"
                        ]
                      },
                      "config": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "runOn": {
                        "type": "object",
                        "properties": {
                          "frequency": {
                            "default": "trace",
                            "type": "string",
                            "enum": [
                              "trace",
                              "session",
                              "span_type",
                              "span_name"
                            ]
                          },
                          "span_names": {
                            "anyOf": [
                              {
                                "maxItems": 128,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "span_types": {
                            "anyOf": [
                              {
                                "maxItems": 128,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "timeframeDays": {
                        "default": 14,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 90
                      }
                    },
                    "required": [
                      "goal",
                      "displayName",
                      "description",
                      "type",
                      "config",
                      "runOn"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "const": "prepare"
                          },
                          "proposal": {
                            "type": "object",
                            "properties": {
                              "goal": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "display_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "classifier",
                                  "regex",
                                  "conditional",
                                  "pii",
                                  "custom_trained",
                                  "code",
                                  "trace_rules",
                                  "decision"
                                ]
                              },
                              "sentiment": {
                                "default": "negative",
                                "type": "string",
                                "enum": [
                                  "negative",
                                  "positive",
                                  "neutral"
                                ]
                              },
                              "config": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "run_on": {
                                "type": "object",
                                "properties": {
                                  "frequency": {
                                    "default": "trace",
                                    "type": "string",
                                    "enum": [
                                      "trace",
                                      "session",
                                      "span_type",
                                      "span_name"
                                    ]
                                  },
                                  "span_types": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "span_names": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              "threshold": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "timeframe_days": {
                                "default": 14,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 90
                              },
                              "preview_trace_ids": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              }
                            },
                            "required": [
                              "goal",
                              "display_name",
                              "description",
                              "type",
                              "config",
                              "run_on"
                            ],
                            "additionalProperties": false
                          },
                          "authoring": {
                            "type": "object",
                            "properties": {
                              "thread_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "request_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "requirement_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "goal": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "target": {
                                "type": "string",
                                "enum": [
                                  "span",
                                  "trace",
                                  "session"
                                ]
                              },
                              "comparisons": {
                                "default": [],
                                "maxItems": 32,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string",
                                      "maxLength": 200
                                    },
                                    "operator": {
                                      "type": "string",
                                      "enum": [
                                        "<",
                                        "<=",
                                        ">",
                                        ">=",
                                        "==",
                                        "!="
                                      ]
                                    },
                                    "value": {
                                      "type": "number"
                                    },
                                    "unit": {
                                      "type": "string",
                                      "maxLength": 80
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "operator",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "semantic_threshold": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "required_predicates": {
                                "maxItems": 32,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                }
                              },
                              "measured_interval": {
                                "type": "string",
                                "enum": [
                                  "response_delay",
                                  "total_duration"
                                ]
                              },
                              "duration_proxy_accepted": {
                                "type": "boolean"
                              },
                              "proxy_acceptance": {
                                "type": "string",
                                "maxLength": 2000
                              }
                            },
                            "required": [
                              "thread_id",
                              "request_id",
                              "requirement_id",
                              "goal",
                              "target"
                            ],
                            "additionalProperties": false
                          },
                          "preview_policy": {
                            "description": "Opt in to the Curator example check for this preview: only detector failures block the draft; trace or data issues do not.",
                            "type": "string",
                            "const": "curator_example_check_v1"
                          }
                        },
                        "required": [
                          "action",
                          "proposal",
                          "authoring"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "const": "revise"
                          },
                          "draft_id": {
                            "$ref": "#/components/schemas/PublicUuid"
                          },
                          "expected_revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "proposal": {
                            "type": "object",
                            "properties": {
                              "goal": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "display_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8000
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "classifier",
                                  "regex",
                                  "conditional",
                                  "pii",
                                  "custom_trained",
                                  "code",
                                  "trace_rules",
                                  "decision"
                                ]
                              },
                              "sentiment": {
                                "default": "negative",
                                "type": "string",
                                "enum": [
                                  "negative",
                                  "positive",
                                  "neutral"
                                ]
                              },
                              "config": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              "run_on": {
                                "type": "object",
                                "properties": {
                                  "frequency": {
                                    "default": "trace",
                                    "type": "string",
                                    "enum": [
                                      "trace",
                                      "session",
                                      "span_type",
                                      "span_name"
                                    ]
                                  },
                                  "span_types": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "span_names": {
                                    "anyOf": [
                                      {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              },
                              "threshold": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "timeframe_days": {
                                "default": 14,
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 90
                              },
                              "preview_trace_ids": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              }
                            },
                            "required": [
                              "goal",
                              "display_name",
                              "description",
                              "type",
                              "config",
                              "run_on"
                            ],
                            "additionalProperties": false
                          },
                          "preview_policy": {
                            "description": "Opt in to the Curator example check for this preview: only detector failures block the draft; trace or data issues do not.",
                            "type": "string",
                            "const": "curator_example_check_v1"
                          }
                        },
                        "required": [
                          "action",
                          "draft_id",
                          "expected_revision",
                          "proposal"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "const": "retest"
                          },
                          "draft_id": {
                            "$ref": "#/components/schemas/PublicUuid"
                          },
                          "preview_trace_ids": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "preview_policy": {
                            "description": "Opt in to the Curator example check for this preview: only detector failures block the draft; trace or data issues do not.",
                            "type": "string",
                            "const": "curator_example_check_v1"
                          }
                        },
                        "required": [
                          "action",
                          "draft_id"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "const": "commit"
                          },
                          "draft_id": {
                            "$ref": "#/components/schemas/PublicUuid"
                          },
                          "fingerprint": {
                            "type": "string",
                            "minLength": 64,
                            "maxLength": 64
                          },
                          "approval_fingerprint": {
                            "type": "string",
                            "minLength": 64,
                            "maxLength": 64
                          },
                          "activate": {
                            "default": false,
                            "type": "boolean"
                          },
                          "evidence": {
                            "type": "object",
                            "properties": {
                              "positive_trace_ids": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "negative_trace_ids": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "policy": {
                                "description": "Opt in to the Curator example check for activation: at least one flagged failing example is required, passing examples are optional, a match found in partly read content counts as flagged, and trace or data issues in the preview do not block.",
                                "type": "string",
                                "const": "curator_example_check_v1"
                              }
                            },
                            "additionalProperties": false,
                            "description": "Known examples the reviewed preview must prove. Without policy, positive_trace_ids and negative_trace_ids are both required and non-empty. With policy, activation needs at least one flagged positive_trace_ids entry and negative_trace_ids is optional."
                          },
                          "draft_notes": {
                            "type": "string",
                            "maxLength": 4000
                          }
                        },
                        "required": [
                          "action",
                          "draft_id",
                          "fingerprint",
                          "approval_fingerprint"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-authoring/{draftId}": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Read this actor's detection draft and current reviewed evidence",
        "description": "Fetch a specific public detection-authoring.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detection_authoring_draftId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Actor-bound detection draft",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PublicDetectionDraft"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "actorServiceAccountId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "goal": {
                              "type": "string"
                            },
                            "fingerprint": {
                              "type": "string"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "testing",
                                "ready",
                                "blocked",
                                "active",
                                "paused",
                                "draft",
                                "deleted"
                              ]
                            },
                            "revision": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "input": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            "preview": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "total_count": {
                                      "type": "number",
                                      "minimum": 0
                                    },
                                    "samples": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      }
                                    },
                                    "scanned_count": {
                                      "anyOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "count_complete": {
                                      "anyOf": [
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "failed_count": {
                                      "anyOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "skipped_count": {
                                      "anyOf": [
                                        {
                                          "type": "number",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "stop_reason": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "failure_reasons": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    },
                                    "failure_details": {
                                      "maxItems": 10,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "target_type": {
                                            "type": "string",
                                            "enum": [
                                              "span",
                                              "trace",
                                              "session"
                                            ]
                                          },
                                          "target_id": {
                                            "type": "string"
                                          },
                                          "anchor_trace_id": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "status": {
                                            "type": "string"
                                          },
                                          "code": {
                                            "type": "string"
                                          },
                                          "message": {
                                            "type": "string"
                                          },
                                          "retryable": {
                                            "type": "boolean"
                                          },
                                          "stage": {
                                            "type": "string",
                                            "enum": [
                                              "source_validation",
                                              "normalization",
                                              "evidence_loading",
                                              "jev_evaluation",
                                              "persistence",
                                              "evaluation"
                                            ]
                                          },
                                          "diagnostics": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string"
                                              },
                                              "additionalProperties": {}
                                            }
                                          }
                                        },
                                        "required": [
                                          "target_type",
                                          "target_id",
                                          "status",
                                          "code",
                                          "message",
                                          "retryable"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "evaluated_samples": {
                                      "maxItems": 10,
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "additionalProperties": {}
                                      }
                                    },
                                    "evaluated_trace_matches": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {
                                        "type": "boolean"
                                      }
                                    },
                                    "code_validation": {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "passed"
                                        },
                                        "source_hash": {
                                          "type": "string",
                                          "minLength": 64,
                                          "maxLength": 64
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "source_hash"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "total_count",
                                    "samples"
                                  ],
                                  "additionalProperties": {}
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "detectionId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "approvalFingerprint": {
                              "type": "string"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "detectionState": {
                              "type": "object",
                              "properties": {
                                "isActive": {
                                  "type": "boolean"
                                },
                                "isDraft": {
                                  "type": "boolean"
                                },
                                "draftNotes": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "backfillStatus": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "backfillProgress": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {}
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "configFingerprint": {
                                  "type": "string",
                                  "minLength": 64,
                                  "maxLength": 64
                                },
                                "updatedAt": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "isActive",
                                "backfillStatus",
                                "backfillProgress",
                                "configFingerprint",
                                "updatedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "projectId",
                            "actorId",
                            "goal",
                            "fingerprint",
                            "status",
                            "revision",
                            "input",
                            "preview",
                            "error",
                            "detectionId",
                            "createdAt",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection authoring discovery unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "draftId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "draftId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-actor-requirements": {
          "user": {
            "apiScope": "configuration:write",
            "permission": "detection:manage"
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-authoring/{draftId}/commit": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Approve the exact reviewed actor-bound revision and atomically create its Detection",
        "description": "Create or trigger detection-authoring commit.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_authoring_draftId_commit",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Explicitly approved exact draft",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionDraft"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Draft approval or current source changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection authoring discovery unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "draftId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "draftId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fingerprint": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "approvalFingerprint": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "approve": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "revision",
                  "fingerprint",
                  "approvalFingerprint",
                  "approve"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-authoring/{draftId}/retest": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Retest the exact actor-bound draft revision without approval",
        "description": "Create or trigger detection-authoring retest.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_authoring_draftId_retest",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Retested inactive actor-bound draft",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionDraft"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Draft or request changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection authoring discovery unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "draftId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "draftId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fingerprint": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "revision",
                  "fingerprint"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-authoring/{draftId}/revise": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Revise the exact actor-bound draft revision without approval",
        "description": "Create or trigger detection-authoring revise.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_authoring_draftId_revise",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Revised inactive actor-bound draft",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionDraft"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Draft or request changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection authoring discovery unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "draftId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "draftId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fingerprint": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "proposal": {
                    "type": "object",
                    "properties": {
                      "goal": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8000
                      },
                      "displayName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8000
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "classifier",
                          "regex",
                          "conditional",
                          "pii",
                          "custom_trained",
                          "code",
                          "trace_rules",
                          "decision"
                        ]
                      },
                      "sentiment": {
                        "default": "negative",
                        "type": "string",
                        "enum": [
                          "negative",
                          "positive",
                          "neutral"
                        ]
                      },
                      "config": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "runOn": {
                        "type": "object",
                        "properties": {
                          "frequency": {
                            "default": "trace",
                            "type": "string",
                            "enum": [
                              "trace",
                              "session",
                              "span_type",
                              "span_name"
                            ]
                          },
                          "span_names": {
                            "anyOf": [
                              {
                                "maxItems": 128,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "span_types": {
                            "anyOf": [
                              {
                                "maxItems": 128,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "timeframeDays": {
                        "default": 14,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 90
                      }
                    },
                    "required": [
                      "goal",
                      "displayName",
                      "description",
                      "type",
                      "config",
                      "runOn"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "revision",
                  "fingerprint",
                  "proposal"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-authoring/conversations": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Start an actor-owned inactive detection authoring conversation",
        "description": "Create or trigger detection-authoring conversations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_authoring_conversations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded actor-owned detection conversation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionConversation"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Conversation, turn or clarification changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Conversation unavailable; reconcile its persisted status. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "goal": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  }
                },
                "required": [
                  "goal"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-authoring/conversations/{conversationId}": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Read bounded persisted detection authoring status and clarification",
        "description": "Fetch a specific detection-authoring conversations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detection_authoring_conversations_conversationId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded actor-owned detection conversation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionConversation"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Conversation, turn or clarification changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Conversation unavailable; reconcile its persisted status. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "conversationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-authoring/conversations/{conversationId}/cancel": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Request cancellation of the exact current run; poll status for terminal cleanup",
        "description": "Create or trigger conversations cancel.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_authoring_conversations_conversationId_cancel",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded actor-owned detection conversation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionConversation"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Conversation, turn or clarification changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Conversation unavailable; reconcile its persisted status. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "conversationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "runId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-authoring/conversations/{conversationId}/turns": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Run one bounded detection authoring turn or resume a reviewed clarification",
        "description": "Create or trigger conversations turns.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_authoring_conversations_conversationId_turns",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded actor-owned detection conversation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionConversation"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Conversation, turn or clarification changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Conversation unavailable; reconcile its persisted status. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "conversationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000
                  },
                  "answer": {
                    "type": "object",
                    "properties": {
                      "messageId": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "answers": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "questionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "choiceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "otherText": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000
                            },
                            "skipped": {
                              "default": false,
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "questionId"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "messageId",
                      "answers"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "query"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-groups": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "List detection groups",
        "description": "List or read public detection-groups.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detection_groups",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded detection group catalog page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "createdAt",
                              "id",
                              "name",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "groups",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Create a detection group",
        "description": "Create or trigger public detection-groups.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_groups",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Detection group created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection group conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-groups/{groupId}": {
      "delete": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Delete a detection group",
        "description": "Delete public detection-groups.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_detection_groups_groupId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection group deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "groupId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "deleted",
                        "groupId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection group not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection group is in use",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "groupId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Get a detection group",
        "description": "Fetch a specific public detection-groups.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detection_groups_groupId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection group metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection group not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "groupId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Update a detection group",
        "description": "Partially update public detection-groups.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_detection_groups_groupId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection group updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection group not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection group conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "groupId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-pending-suggestions": {
      "get": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "List App pending suggestions with explicit Detection identities",
        "description": "List or read public detection-pending-suggestions.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detection_pending_suggestions",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "App suggestion result",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "origin": {
                          "type": "string",
                          "const": "app_detection"
                        },
                        "suggestions": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "groupId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "groupName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "isActive": {
                                "type": "boolean"
                              },
                              "showHistoricalResults": {
                                "type": "boolean"
                              },
                              "activeAlertCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "lifecycleStatus": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "paused",
                                  "disabled"
                                ]
                              },
                              "catalogRevision": {
                                "type": "string",
                                "maxLength": 128
                              },
                              "policyRevision": {
                                "type": "string",
                                "maxLength": 128
                              },
                              "issueSemantics": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "slug": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "threshold": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "classifier",
                                  "regex",
                                  "conditional",
                                  "pii",
                                  "custom_trained",
                                  "code",
                                  "trace_rules",
                                  "decision"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "origin": {
                                "type": "string",
                                "const": "app_detection"
                              },
                              "acceptance": {
                                "type": "string",
                                "enum": [
                                  "activate",
                                  "review_code",
                                  "ready_model"
                                ]
                              }
                            },
                            "required": [
                              "createdAt",
                              "displayName",
                              "groupId",
                              "groupName",
                              "id",
                              "isActive",
                              "slug",
                              "threshold",
                              "type",
                              "updatedAt",
                              "origin",
                              "acceptance"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "nextId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "nextId"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "origin",
                        "suggestions",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Suggestion revision or model unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Suggestion configuration unsupported",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Suggestion generation unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "afterId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "afterId query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-pending-suggestions/accept": {
      "post": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "Accept selected App suggestions with exact partial outcomes; Code remains inactive",
        "description": "Create or trigger detection-pending-suggestions accept.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_pending_suggestions_accept",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "App suggestion result",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "origin": {
                          "type": "string",
                          "const": "app_detection"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "accept",
                            "dismiss"
                          ]
                        },
                        "changedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "results": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "detectionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "outcome": {
                                "type": "string",
                                "enum": [
                                  "accepted",
                                  "dismissed",
                                  "not_changed",
                                  "not_found",
                                  "blocked"
                                ]
                              },
                              "isActive": {
                                "type": "boolean"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "ready_model_required",
                                  "invalid_configuration"
                                ]
                              }
                            },
                            "required": [
                              "detectionId",
                              "outcome"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "origin",
                        "action",
                        "changedCount",
                        "results"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Suggestion revision or model unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Suggestion configuration unsupported",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Suggestion generation unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "const": "app_detection"
                  },
                  "detectionIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "origin",
                  "detectionIds",
                  "confirm"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-pending-suggestions/dismiss": {
      "post": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "Dismiss selected App suggestions with exact partial outcomes",
        "description": "Create or trigger detection-pending-suggestions dismiss.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_pending_suggestions_dismiss",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "App suggestion result",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "origin": {
                          "type": "string",
                          "const": "app_detection"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "accept",
                            "dismiss"
                          ]
                        },
                        "changedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "results": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "detectionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "outcome": {
                                "type": "string",
                                "enum": [
                                  "accepted",
                                  "dismissed",
                                  "not_changed",
                                  "not_found",
                                  "blocked"
                                ]
                              },
                              "isActive": {
                                "type": "boolean"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "ready_model_required",
                                  "invalid_configuration"
                                ]
                              }
                            },
                            "required": [
                              "detectionId",
                              "outcome"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "origin",
                        "action",
                        "changedCount",
                        "results"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Suggestion revision or model unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Suggestion configuration unsupported",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Suggestion generation unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "const": "app_detection"
                  },
                  "detectionIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  },
                  "confirm": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "origin",
                  "detectionIds",
                  "confirm"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-pending-suggestions/generate": {
      "post": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "Generate one bounded inactive App suggestion for human review",
        "description": "Create or trigger detection-pending-suggestions generate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_pending_suggestions_generate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "App suggestion result",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "displayName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "groupId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "groupName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isActive": {
                          "type": "boolean"
                        },
                        "showHistoricalResults": {
                          "type": "boolean"
                        },
                        "activeAlertCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "lifecycleStatus": {
                          "type": "string",
                          "enum": [
                            "active",
                            "paused",
                            "disabled"
                          ]
                        },
                        "catalogRevision": {
                          "type": "string",
                          "maxLength": 128
                        },
                        "policyRevision": {
                          "type": "string",
                          "maxLength": 128
                        },
                        "issueSemantics": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicDetectionIssueSemanticsOutput"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "threshold": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "classifier",
                            "regex",
                            "conditional",
                            "pii",
                            "custom_trained",
                            "code",
                            "trace_rules",
                            "decision"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "origin": {
                          "type": "string",
                          "const": "app_detection"
                        },
                        "acceptance": {
                          "type": "string",
                          "enum": [
                            "activate",
                            "review_code",
                            "ready_model"
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "displayName",
                        "groupId",
                        "groupName",
                        "id",
                        "isActive",
                        "slug",
                        "threshold",
                        "type",
                        "updatedAt",
                        "origin",
                        "acceptance"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Suggestion revision or model unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Suggestion configuration unsupported",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Suggestion generation unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "traceContextLimit": {
                    "default": 25,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-suggestion-runs": {
      "post": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "Create a durable detection suggestion run",
        "description": "Create or trigger public detection-suggestion-runs.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_suggestion_runs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Detection suggestion run queued",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "origin": {
                          "type": "string",
                          "const": "public_run"
                        },
                        "acceptedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "cancelRequestedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "dismissedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "PUBLIC_DETECTION_SUGGESTION_OUTCOME_UNKNOWN",
                                "PUBLIC_DETECTION_SUGGESTION_RECONCILIATION_REQUIRED",
                                "PUBLIC_DETECTION_SUGGESTION_ACQUISITION_METADATA_WAIT",
                                "PUBLIC_DETECTION_SUGGESTION_DISPATCH_AUTHORIZATION_REQUIRED",
                                "PUBLIC_DETECTION_SUGGESTION_CANCELLED",
                                "PUBLIC_DETECTION_SUGGESTION_PROVIDER_ERROR",
                                "PUBLIC_DETECTION_SUGGESTION_TIMEOUT",
                                "PUBLIC_DETECTION_SUGGESTION_UNAVAILABLE"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "startedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "succeeded",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "suggestionCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "acceptedCount",
                        "cancelRequestedAt",
                        "completedAt",
                        "createdAt",
                        "dismissedCount",
                        "errorCode",
                        "id",
                        "startedAt",
                        "status",
                        "suggestionCount",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "A detection suggestion run is already active",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "traceContextLimit": {
                    "default": 25,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-suggestion-runs/{runId}": {
      "get": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "Get a detection suggestion run",
        "description": "Fetch a specific public detection-suggestion-runs.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detection_suggestion_runs_runId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection suggestion run",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "origin": {
                          "type": "string",
                          "const": "public_run"
                        },
                        "acceptedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "cancelRequestedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "dismissedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "PUBLIC_DETECTION_SUGGESTION_OUTCOME_UNKNOWN",
                                "PUBLIC_DETECTION_SUGGESTION_RECONCILIATION_REQUIRED",
                                "PUBLIC_DETECTION_SUGGESTION_ACQUISITION_METADATA_WAIT",
                                "PUBLIC_DETECTION_SUGGESTION_DISPATCH_AUTHORIZATION_REQUIRED",
                                "PUBLIC_DETECTION_SUGGESTION_CANCELLED",
                                "PUBLIC_DETECTION_SUGGESTION_PROVIDER_ERROR",
                                "PUBLIC_DETECTION_SUGGESTION_TIMEOUT",
                                "PUBLIC_DETECTION_SUGGESTION_UNAVAILABLE"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "startedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "succeeded",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "suggestionCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "acceptedCount",
                        "cancelRequestedAt",
                        "completedAt",
                        "createdAt",
                        "dismissedCount",
                        "errorCode",
                        "id",
                        "startedAt",
                        "status",
                        "suggestionCount",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection suggestion run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-suggestion-runs/{runId}/cancel": {
      "post": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "Cancel a detection suggestion run",
        "description": "Create or trigger detection-suggestion-runs cancel.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_suggestion_runs_runId_cancel",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection suggestion run cancellation requested",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "origin": {
                          "type": "string",
                          "const": "public_run"
                        },
                        "acceptedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "cancelRequestedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "dismissedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "PUBLIC_DETECTION_SUGGESTION_OUTCOME_UNKNOWN",
                                "PUBLIC_DETECTION_SUGGESTION_RECONCILIATION_REQUIRED",
                                "PUBLIC_DETECTION_SUGGESTION_ACQUISITION_METADATA_WAIT",
                                "PUBLIC_DETECTION_SUGGESTION_DISPATCH_AUTHORIZATION_REQUIRED",
                                "PUBLIC_DETECTION_SUGGESTION_CANCELLED",
                                "PUBLIC_DETECTION_SUGGESTION_PROVIDER_ERROR",
                                "PUBLIC_DETECTION_SUGGESTION_TIMEOUT",
                                "PUBLIC_DETECTION_SUGGESTION_UNAVAILABLE"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "startedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "succeeded",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "suggestionCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "acceptedCount",
                        "cancelRequestedAt",
                        "completedAt",
                        "createdAt",
                        "dismissedCount",
                        "errorCode",
                        "id",
                        "startedAt",
                        "status",
                        "suggestionCount",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection suggestion run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-suggestions": {
      "get": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "List detection suggestions",
        "description": "List or read public detection-suggestions.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detection_suggestions",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded detection suggestion page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "suggestions": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "detectionId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "origin": {
                                "type": "string",
                                "const": "public_run"
                              },
                              "draft": {
                                "$ref": "#/components/schemas/PublicDetectionCreateOutput"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "runId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "accepted",
                                  "dismissed"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "createdAt",
                              "detectionId",
                              "draft",
                              "id",
                              "runId",
                              "status",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "suggestions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detection-suggestions/{suggestionId}/accept": {
      "post": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "Accept one detection suggestion",
        "description": "Create or trigger detection-suggestions accept.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_suggestions_suggestionId_accept",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection suggestion accepted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "const": "public_run"
                        },
                        "draft": {
                          "$ref": "#/components/schemas/PublicDetectionCreateOutput"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "runId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "dismissed"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "detectionId",
                        "draft",
                        "id",
                        "runId",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection suggestion not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection suggestion is terminal",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "suggestionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "suggestionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detection-suggestions/{suggestionId}/dismiss": {
      "post": {
        "tags": [
          "public",
          "detections",
          "suggestions"
        ],
        "summary": "Dismiss one detection suggestion",
        "description": "Create or trigger detection-suggestions dismiss.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detection_suggestions_suggestionId_dismiss",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection suggestion dismissed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "origin": {
                          "type": "string",
                          "const": "public_run"
                        },
                        "draft": {
                          "$ref": "#/components/schemas/PublicDetectionCreateOutput"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "runId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "dismissed"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "detectionId",
                        "draft",
                        "id",
                        "runId",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection suggestion not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection suggestion is terminal",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "suggestionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "suggestionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "List detections",
        "description": "List or read public detections.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded detection catalog page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "detections": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PublicDetectionSummary"
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "detections",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "search query parameter"
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "default": "created_at",
              "type": "string",
              "enum": [
                "name",
                "sentiment",
                "type",
                "created_at",
                "updated_at",
                "alerts"
              ]
            },
            "description": "sortBy query parameter"
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "sortDirection query parameter"
          },
          {
            "name": "groupId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "groupId query parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "paused",
                "disabled",
                "inactive",
                "all"
              ]
            },
            "description": "status query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Create a detection",
        "description": "Create or trigger public detections.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Detection created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionSummary"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDetectionCreateInput"
              }
            }
          }
        },
        "x-neatlogs-actor-requirements": {
          "service_account": {
            "apiScope": "configuration:write",
            "permission": "detection:manage"
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/{detectionId}": {
      "delete": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Delete a detection",
        "description": "Delete public detections.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_detections_detectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "detectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "deleted",
                        "detectionId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection is in use",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Get a detection",
        "description": "Fetch a specific public detections.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_detectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionDetail"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Update a detection",
        "description": "Partially update public detections.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_detections_detectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionSummary"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDetectionUpdateInput"
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/{detectionId}/backfills": {
      "post": {
        "tags": [
          "public",
          "classifiers"
        ],
        "summary": "Accept an explicit bounded historical detection backfill",
        "description": "Create or trigger detections backfills.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_detectionId_backfills",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Accept an explicit bounded historical detection backfill",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "dataset",
                            "training",
                            "backfill"
                          ]
                        },
                        "classifierId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "completed",
                            "failed",
                            "cancelling",
                            "cancelled"
                          ]
                        },
                        "datasetVersion": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "trainingRunId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "budgetMicrousd": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000000
                        },
                        "accounting": {
                          "type": "string",
                          "enum": [
                            "reserved",
                            "released",
                            "charged_ceiling"
                          ]
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100,
                              "pattern": "^[A-Z0-9_]+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "progress": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "selectedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "processedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "failedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "flaggedCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000000
                                },
                                "truncated": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "selectedTraces",
                                "processedTraces",
                                "failedTraces",
                                "flaggedCount",
                                "truncated"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "classifierId",
                        "detectionId",
                        "status",
                        "datasetVersion",
                        "trainingRunId",
                        "budgetMicrousd",
                        "accounting",
                        "errorCode",
                        "progress",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Classifier or job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Classifier lifecycle conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Classifier operation cannot be admitted",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Classifier provider admission unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90
                  },
                  "maxTraces": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  },
                  "batchSize": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "maxDurationSeconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 3600
                  },
                  "budgetMicrousd": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000000
                  }
                },
                "required": [
                  "days",
                  "maxTraces",
                  "batchSize",
                  "maxDurationSeconds",
                  "budgetMicrousd"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/{detectionId}/backfills/{jobId}": {
      "delete": {
        "tags": [
          "public",
          "classifiers"
        ],
        "summary": "Cancel a historical backfill job",
        "description": "Delete detections backfills.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_detections_detectionId_backfills_jobId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Cancel a historical backfill job",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "dataset",
                            "training",
                            "backfill"
                          ]
                        },
                        "classifierId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "completed",
                            "failed",
                            "cancelling",
                            "cancelled"
                          ]
                        },
                        "datasetVersion": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "trainingRunId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "budgetMicrousd": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000000
                        },
                        "accounting": {
                          "type": "string",
                          "enum": [
                            "reserved",
                            "released",
                            "charged_ceiling"
                          ]
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100,
                              "pattern": "^[A-Z0-9_]+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "progress": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "selectedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "processedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "failedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "flaggedCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000000
                                },
                                "truncated": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "selectedTraces",
                                "processedTraces",
                                "failedTraces",
                                "flaggedCount",
                                "truncated"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "classifierId",
                        "detectionId",
                        "status",
                        "datasetVersion",
                        "trainingRunId",
                        "budgetMicrousd",
                        "accounting",
                        "errorCode",
                        "progress",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Classifier or job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Classifier lifecycle conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Classifier operation cannot be admitted",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Classifier provider admission unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "classifiers"
        ],
        "summary": "Get a historical backfill job",
        "description": "Fetch a specific detections backfills.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_detectionId_backfills_jobId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Get a historical backfill job",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "dataset",
                            "training",
                            "backfill"
                          ]
                        },
                        "classifierId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "detectionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "completed",
                            "failed",
                            "cancelling",
                            "cancelled"
                          ]
                        },
                        "datasetVersion": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "trainingRunId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "budgetMicrousd": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000000
                        },
                        "accounting": {
                          "type": "string",
                          "enum": [
                            "reserved",
                            "released",
                            "charged_ceiling"
                          ]
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100,
                              "pattern": "^[A-Z0-9_]+$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "progress": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "selectedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "processedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "failedTraces": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "flaggedCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000000
                                },
                                "truncated": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "selectedTraces",
                                "processedTraces",
                                "failedTraces",
                                "flaggedCount",
                                "truncated"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "id",
                        "kind",
                        "classifierId",
                        "detectionId",
                        "status",
                        "datasetVersion",
                        "trainingRunId",
                        "budgetMicrousd",
                        "accounting",
                        "errorCode",
                        "progress",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Classifier or job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Classifier lifecycle conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Classifier operation cannot be admitted",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Classifier provider admission unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/{detectionId}/history": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "List detection change history",
        "description": "Fetch a specific detections history.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_detectionId_history",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Privacy-safe detection change history",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "actorKind": {
                                "type": "string",
                                "enum": [
                                  "service",
                                  "service_account",
                                  "unknown",
                                  "user"
                                ]
                              },
                              "changedFields": {
                                "maxItems": 8,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "batchFields",
                                    "config",
                                    "description",
                                    "displayName",
                                    "groupId",
                                    "isActive",
                                    "runOn",
                                    "threshold"
                                  ]
                                }
                              },
                              "changeType": {
                                "type": "string",
                                "enum": [
                                  "created",
                                  "deleted",
                                  "toggled",
                                  "updated"
                                ]
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              }
                            },
                            "required": [
                              "actorKind",
                              "changedFields",
                              "changeType",
                              "createdAt",
                              "id"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "events",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/{detectionId}/hits": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "List detection hits",
        "description": "Fetch a specific detections hits.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_detectionId_hits",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded detection hit references",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "hits": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "detectedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "itemIndex": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "score": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "spanId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "traceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              }
                            },
                            "required": [
                              "detectedAt",
                              "id",
                              "itemIndex",
                              "score",
                              "spanId",
                              "traceId"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "hits",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/{detectionId}/results": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "List typed detection findings",
        "description": "Fetch a specific detections results.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_detectionId_results",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Typed detection findings",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "detectedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "itemIndex": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "score": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "targetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "span"
                                  },
                                  "spanId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  }
                                },
                                "required": [
                                  "detectedAt",
                                  "id",
                                  "itemIndex",
                                  "reason",
                                  "score",
                                  "targetId",
                                  "traceId",
                                  "targetType",
                                  "spanId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "detectedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "itemIndex": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "score": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "targetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "trace"
                                  }
                                },
                                "required": [
                                  "detectedAt",
                                  "id",
                                  "itemIndex",
                                  "reason",
                                  "score",
                                  "targetId",
                                  "traceId",
                                  "targetType"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "detectedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "itemIndex": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "score": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "targetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "session"
                                  },
                                  "sessionId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "targetRevision": {
                                    "type": "string",
                                    "pattern": "^[1-9]\\d{0,18}$"
                                  },
                                  "memberCount": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 10000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "detectedAt",
                                  "id",
                                  "itemIndex",
                                  "reason",
                                  "score",
                                  "targetId",
                                  "traceId",
                                  "targetType",
                                  "sessionId",
                                  "targetRevision",
                                  "memberCount"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "results",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUtcTimestamp"
            },
            "description": "from query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "minScore",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "description": "minScore query parameter"
          },
          {
            "name": "targetType",
            "in": "query",
            "required": false,
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "span",
                "trace",
                "session",
                "all"
              ]
            },
            "description": "targetType query parameter"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUtcTimestamp"
            },
            "description": "to query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/{detectionId}/results/activity": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Read bounded result activity",
        "description": "Create or trigger results activity.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_detectionId_results_activity",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded comment and vote counts",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "activity": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "resultId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "span"
                                  },
                                  "commentCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "votes": {
                                    "type": "object",
                                    "properties": {
                                      "upCount": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "downCount": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "upCount",
                                      "downCount"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "capabilities": {
                                    "type": "object",
                                    "properties": {
                                      "comments": {
                                        "type": "boolean",
                                        "const": true
                                      },
                                      "votes": {
                                        "type": "boolean",
                                        "const": true
                                      }
                                    },
                                    "required": [
                                      "comments",
                                      "votes"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "resultId",
                                  "targetType",
                                  "commentCount",
                                  "votes",
                                  "capabilities"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "resultId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "trace"
                                  },
                                  "commentCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "votes": {
                                    "type": "null"
                                  },
                                  "capabilities": {
                                    "type": "object",
                                    "properties": {
                                      "comments": {
                                        "type": "boolean",
                                        "const": true
                                      },
                                      "votes": {
                                        "type": "boolean",
                                        "const": false
                                      }
                                    },
                                    "required": [
                                      "comments",
                                      "votes"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "resultId",
                                  "targetType",
                                  "commentCount",
                                  "votes",
                                  "capabilities"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "resultId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "session"
                                  },
                                  "commentCount": {
                                    "type": "null"
                                  },
                                  "votes": {
                                    "type": "null"
                                  },
                                  "capabilities": {
                                    "type": "object",
                                    "properties": {
                                      "comments": {
                                        "type": "boolean",
                                        "const": false
                                      },
                                      "votes": {
                                        "type": "boolean",
                                        "const": false
                                      }
                                    },
                                    "required": [
                                      "comments",
                                      "votes"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "resultId",
                                  "targetType",
                                  "commentCount",
                                  "votes",
                                  "capabilities"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "activity"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resultIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    },
                    "uniqueItems": true
                  }
                },
                "required": [
                  "resultIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/{detectionId}/status": {
      "patch": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Set detection state",
        "description": "Partially update detections status.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_detections_detectionId_status",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Detection state updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionSummary"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "isActive": {
                        "type": "boolean"
                      },
                      "acknowledgedAlerts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "enabled": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "enabled"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "isActive"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "enum": [
                          "enable",
                          "pause",
                          "disable"
                        ]
                      },
                      "acknowledgedAlerts": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "name": {
                              "type": "string"
                            },
                            "enabled": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "enabled"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "action"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/{detectionId}/trends": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Get detection trends",
        "description": "Fetch a specific detections trends.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_detectionId_trends",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded detection trend buckets",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "buckets": {
                          "maxItems": 2200,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "start": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "count",
                              "start"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "from": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "granularity": {
                          "type": "string",
                          "enum": [
                            "hour",
                            "day",
                            "week"
                          ]
                        },
                        "to": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "buckets",
                        "from",
                        "granularity",
                        "to"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "detectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId path parameter"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUtcTimestamp"
            },
            "description": "from query parameter"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "default": "day",
              "type": "string",
              "enum": [
                "hour",
                "day",
                "week"
              ]
            },
            "description": "granularity query parameter"
          },
          {
            "name": "targetType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "span",
                "trace",
                "session",
                "all"
              ]
            },
            "description": "targetType query parameter"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUtcTimestamp"
            },
            "description": "to query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/detections/authoring/context": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Read up to 100 current project detection summaries for authoring",
        "description": "List or read authoring context.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_authoring_context",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded authoring context",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "project_id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "preview_window_days": {
                          "type": "number",
                          "const": 14
                        },
                        "existing_detections_has_more": {
                          "type": "boolean"
                        },
                        "existing_detections": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "display_name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "classifier",
                                  "regex",
                                  "conditional",
                                  "pii",
                                  "custom_trained",
                                  "code",
                                  "trace_rules",
                                  "decision"
                                ]
                              },
                              "run_on": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "frequency": {
                                        "default": "trace",
                                        "type": "string",
                                        "enum": [
                                          "trace",
                                          "session",
                                          "span_type",
                                          "span_name"
                                        ]
                                      },
                                      "span_types": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "span_names": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "frequency"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_active": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "display_name",
                              "type",
                              "run_on",
                              "is_active"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "project_id",
                        "preview_window_days",
                        "existing_detections"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection authoring discovery unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/authoring/helpers": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Run one fixed bounded detection authoring helper",
        "description": "Create or trigger authoring helpers.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_authoring_helpers",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded fixed editing helper result",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "generate-metadata"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "display_name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "description": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 4096
                                },
                                "group": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "$ref": "#/components/schemas/PublicUuid"
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name"
                                  ],
                                  "additionalProperties": false
                                },
                                "generation": {
                                  "type": "string",
                                  "enum": [
                                    "provider",
                                    "fallback"
                                  ]
                                }
                              },
                              "required": [
                                "display_name",
                                "description",
                                "group",
                                "generation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "generate-description"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "description": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 4096
                                },
                                "generation": {
                                  "type": "string",
                                  "enum": [
                                    "provider",
                                    "fallback"
                                  ]
                                }
                              },
                              "required": [
                                "description",
                                "generation"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "conditional-fields"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "fields": {
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "display_name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "number",
                                          "string",
                                          "enum"
                                        ]
                                      },
                                      "description": {
                                        "type": "string",
                                        "maxLength": 4096
                                      },
                                      "values": {
                                        "anyOf": [
                                          {
                                            "maxItems": 100,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 1024
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "allowed_operators": {
                                        "maxItems": 32,
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "=",
                                            "!=",
                                            ">",
                                            "<",
                                            ">=",
                                            "<=",
                                            "contains",
                                            "not_contains",
                                            "in",
                                            "not_in",
                                            "is_empty",
                                            "is_not_empty"
                                          ]
                                        }
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "display_name",
                                      "type",
                                      "description",
                                      "allowed_operators"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "operators": {
                                  "maxItems": 32,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "=",
                                      "!=",
                                      ">",
                                      "<",
                                      ">=",
                                      "<=",
                                      "contains",
                                      "not_contains",
                                      "in",
                                      "not_in",
                                      "is_empty",
                                      "is_not_empty"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "fields",
                                "operators"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "decision-draft"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "criterion": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 4000
                                },
                                "target": {
                                  "type": "string",
                                  "enum": [
                                    "trace",
                                    "session"
                                  ]
                                },
                                "context": {
                                  "type": "string",
                                  "const": "target"
                                },
                                "display_name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "criterion",
                                "target",
                                "context",
                                "display_name"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "semantic-transform"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "criterion": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 4000
                                },
                                "assumptions": {
                                  "maxItems": 3,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 400
                                  }
                                }
                              },
                              "required": [
                                "criterion",
                                "assumptions"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "generate-regex"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "input_pattern": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 32768
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "output_pattern": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 32768
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "operator": {
                                  "type": "string",
                                  "enum": [
                                    "AND",
                                    "OR"
                                  ]
                                },
                                "explanation": {
                                  "type": "string",
                                  "maxLength": 4096
                                },
                                "confidence": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                }
                              },
                              "required": [
                                "input_pattern",
                                "output_pattern",
                                "operator",
                                "explanation",
                                "confidence"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "result"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Editing helper unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "generate-description"
                      },
                      "display_name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "detector": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "regex"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "case_sensitive": {
                                    "default": false,
                                    "type": "boolean"
                                  },
                                  "input_pattern": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 32768
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "operator": {
                                    "default": "OR",
                                    "type": "string",
                                    "enum": [
                                      "AND",
                                      "OR"
                                    ]
                                  },
                                  "output_pattern": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 32768
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "conditional"
                              },
                              "config": {
                                "$ref": "#/components/schemas/PublicDetectionConditionalConfigOutput"
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "pii"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "entities": {
                                    "anyOf": [
                                      {
                                        "maxItems": 5,
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "EMAIL_ADDRESS",
                                            "PHONE_NUMBER",
                                            "CREDIT_CARD",
                                            "IP_ADDRESS",
                                            "URL"
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "classifier"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "classifier_slug": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "backend": {
                                    "type": "string",
                                    "enum": [
                                      "azure",
                                      "decision"
                                    ]
                                  },
                                  "target": {
                                    "type": "string",
                                    "enum": [
                                      "span",
                                      "trace"
                                    ]
                                  }
                                },
                                "required": [
                                  "classifier_slug"
                                ],
                                "additionalProperties": false
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "decision"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "criterion": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 4000
                                  },
                                  "target": {
                                    "default": "span",
                                    "type": "string",
                                    "enum": [
                                      "span",
                                      "trace",
                                      "session"
                                    ]
                                  },
                                  "context": {
                                    "default": "target",
                                    "type": "string",
                                    "enum": [
                                      "target",
                                      "related"
                                    ]
                                  }
                                },
                                "required": [
                                  "criterion"
                                ],
                                "additionalProperties": false
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "trace_rules"
                              },
                              "config": {
                                "$ref": "#/components/schemas/PublicDetectionTraceRulesConfigInput"
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "code"
                              },
                              "config": {
                                "$ref": "#/components/schemas/PublicDetectionCodeConfigInput"
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "action",
                      "display_name",
                      "detector"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "generate-metadata"
                      },
                      "detector": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "regex"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "case_sensitive": {
                                    "default": false,
                                    "type": "boolean"
                                  },
                                  "input_pattern": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 32768
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "operator": {
                                    "default": "OR",
                                    "type": "string",
                                    "enum": [
                                      "AND",
                                      "OR"
                                    ]
                                  },
                                  "output_pattern": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 32768
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "conditional"
                              },
                              "config": {
                                "$ref": "#/components/schemas/PublicDetectionConditionalConfigOutput"
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "pii"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "entities": {
                                    "anyOf": [
                                      {
                                        "maxItems": 5,
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "enum": [
                                            "EMAIL_ADDRESS",
                                            "PHONE_NUMBER",
                                            "CREDIT_CARD",
                                            "IP_ADDRESS",
                                            "URL"
                                          ]
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "classifier"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "classifier_slug": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  },
                                  "backend": {
                                    "type": "string",
                                    "enum": [
                                      "azure",
                                      "decision"
                                    ]
                                  },
                                  "target": {
                                    "type": "string",
                                    "enum": [
                                      "span",
                                      "trace"
                                    ]
                                  }
                                },
                                "required": [
                                  "classifier_slug"
                                ],
                                "additionalProperties": false
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "decision"
                              },
                              "config": {
                                "type": "object",
                                "properties": {
                                  "criterion": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 4000
                                  },
                                  "target": {
                                    "default": "span",
                                    "type": "string",
                                    "enum": [
                                      "span",
                                      "trace",
                                      "session"
                                    ]
                                  },
                                  "context": {
                                    "default": "target",
                                    "type": "string",
                                    "enum": [
                                      "target",
                                      "related"
                                    ]
                                  }
                                },
                                "required": [
                                  "criterion"
                                ],
                                "additionalProperties": false
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "trace_rules"
                              },
                              "config": {
                                "$ref": "#/components/schemas/PublicDetectionTraceRulesConfigInput"
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "code"
                              },
                              "config": {
                                "$ref": "#/components/schemas/PublicDetectionCodeConfigInput"
                              },
                              "runOn": {
                                "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                              }
                            },
                            "required": [
                              "type",
                              "config"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "required": [
                      "action",
                      "detector"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "conditional-fields"
                      }
                    },
                    "required": [
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "decision-draft"
                      },
                      "goal": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4000
                      },
                      "target": {
                        "default": "trace",
                        "type": "string",
                        "enum": [
                          "trace",
                          "session"
                        ]
                      }
                    },
                    "required": [
                      "action",
                      "goal"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "semantic-transform"
                      },
                      "query": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4000
                      }
                    },
                    "required": [
                      "action",
                      "query"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "const": "generate-regex"
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "span_type": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "action",
                      "description"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/classifiers/catalog": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Read active classifier capabilities and policy defaults",
        "description": "List or read classifiers catalog.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_classifiers_catalog",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Active classifier catalog",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "classifiers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "slug": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 4096
                              },
                              "supported_target_levels": {
                                "minItems": 1,
                                "maxItems": 2,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "span",
                                    "trace"
                                  ]
                                }
                              },
                              "default_threshold": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "catalog_revision": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "policy_revision": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "backend": {
                                "type": "string",
                                "enum": [
                                  "azure",
                                  "decision"
                                ]
                              }
                            },
                            "required": [
                              "slug",
                              "name",
                              "description",
                              "supported_target_levels",
                              "default_threshold",
                              "catalog_revision",
                              "policy_revision",
                              "backend"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "classifiers"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection authoring discovery unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/code/repair": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Propose a Code source repair requiring fresh validation and approval",
        "description": "Create or trigger code repair.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_code_repair",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded Code repair proposal",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 16384
                        },
                        "hint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        }
                      },
                      "required": [
                        "source",
                        "hint"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "No safe Code repair could be prepared",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Code repair unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "enum": [
                      "span",
                      "trace",
                      "session"
                    ]
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "python",
                      "javascript"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 16384
                  },
                  "intent": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "target",
                  "language",
                  "source"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/code/validate": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Validate exact Code source and optionally execute one bounded sample",
        "description": "Create or trigger code validate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_code_validate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Source-bound Code validation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean"
                        },
                        "executable": {
                          "type": "boolean"
                        },
                        "target": {
                          "type": "string",
                          "enum": [
                            "span",
                            "trace",
                            "session"
                          ]
                        },
                        "language": {
                          "type": "string",
                          "enum": [
                            "python",
                            "javascript"
                          ]
                        },
                        "input_schema": {
                          "type": "string",
                          "enum": [
                            "span.v1",
                            "trace.v1",
                            "session.v1"
                          ]
                        },
                        "source_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "status": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "succeeded",
                                "compile_error",
                                "timeout",
                                "runtime_error",
                                "invalid_result",
                                "decision_required"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "matched": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "duration_ms": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "diagnostics": {
                          "maxItems": 64,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "message": {
                                "type": "string",
                                "maxLength": 2048
                              },
                              "phase": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "severity": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 32
                              },
                              "line": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "column": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "phase"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "valid",
                        "executable",
                        "target",
                        "language",
                        "input_schema",
                        "source_hash",
                        "status",
                        "matched",
                        "duration_ms",
                        "diagnostics"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Code validation unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "enum": [
                      "span",
                      "trace",
                      "session"
                    ]
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "python",
                      "javascript"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 16384
                  },
                  "entrypoint": {
                    "default": "detect",
                    "type": "string",
                    "const": "detect"
                  },
                  "sample": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "runSample": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "target",
                  "language",
                  "source"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/generate": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Generate a bounded detection draft",
        "description": "Create or trigger detections generate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_generate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Strict public detection draft",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicDetectionCreateOutput"
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Detection generation is unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "goal": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "traceContextLimit": {
                    "default": 25,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "required": [
                  "goal"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/preview": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Preview any supported detection engine within a bounded window",
        "description": "Create or trigger detections preview.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_preview",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Safe matching target samples and a bounded execution receipt",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "samples": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "spanId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "spanName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "spanType": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 50
                                  },
                                  "startedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  }
                                },
                                "required": [
                                  "spanId",
                                  "spanName",
                                  "spanType",
                                  "startedAt",
                                  "traceId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "targetType": {
                                    "type": "string",
                                    "enum": [
                                      "span",
                                      "trace",
                                      "session"
                                    ]
                                  },
                                  "targetId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "itemIndex": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "executionStatus": {
                                    "type": "string",
                                    "enum": [
                                      "succeeded",
                                      "failed",
                                      "skipped",
                                      "timeout"
                                    ]
                                  },
                                  "score": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "flagged": {
                                    "anyOf": [
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "targetRevision": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^(0|[1-9]\\d{0,18})$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "memberCount": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 10000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "evidenceSpanIds": {
                                    "maxItems": 50,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 64
                                    }
                                  },
                                  "spanId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "spanName": {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  "spanType": {
                                    "type": "string",
                                    "maxLength": 50
                                  },
                                  "startedAt": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "targetType",
                                  "targetId",
                                  "traceId",
                                  "itemIndex",
                                  "executionStatus",
                                  "score",
                                  "flagged",
                                  "reason",
                                  "targetRevision",
                                  "memberCount",
                                  "evidenceSpanIds",
                                  "spanId",
                                  "spanName",
                                  "spanType",
                                  "startedAt"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "totalCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "receipt": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "classifier",
                                "regex",
                                "conditional",
                                "pii",
                                "custom_trained",
                                "code",
                                "trace_rules",
                                "decision"
                              ]
                            },
                            "targetType": {
                              "type": "string",
                              "enum": [
                                "span",
                                "trace",
                                "session"
                              ]
                            },
                            "scanned": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "evaluated": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "matched": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "negative": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "failed": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "skipped": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "countComplete": {
                              "type": "boolean"
                            },
                            "inputCoverage": {
                              "type": "string",
                              "enum": [
                                "complete",
                                "partial",
                                "unknown"
                              ]
                            },
                            "truncated": {
                              "type": "boolean"
                            },
                            "stopReason": {
                              "type": "string",
                              "enum": [
                                "complete",
                                "matches_found",
                                "sample_limit",
                                "scan_limit",
                                "time_limit",
                                "evaluation_error",
                                "unknown"
                              ]
                            },
                            "persisted": {
                              "type": "boolean",
                              "const": false
                            },
                            "threshold": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "catalogRevision": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            },
                            "policyRevision": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            },
                            "sourceHash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "modelId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "modelVersion": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "diagnostics": {
                              "maxItems": 20,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "targetType": {
                                    "type": "string",
                                    "enum": [
                                      "span",
                                      "trace",
                                      "session"
                                    ]
                                  },
                                  "targetId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "itemIndex": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "executionStatus": {
                                    "type": "string",
                                    "enum": [
                                      "succeeded",
                                      "failed",
                                      "skipped",
                                      "timeout"
                                    ]
                                  },
                                  "score": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "flagged": {
                                    "anyOf": [
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "targetRevision": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^(0|[1-9]\\d{0,18})$"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "memberCount": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 10000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "evidenceSpanIds": {
                                    "maxItems": 50,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 64
                                    }
                                  }
                                },
                                "required": [
                                  "targetType",
                                  "targetId",
                                  "traceId",
                                  "itemIndex",
                                  "executionStatus",
                                  "score",
                                  "flagged",
                                  "reason",
                                  "targetRevision",
                                  "memberCount",
                                  "evidenceSpanIds"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "type",
                            "targetType",
                            "scanned",
                            "evaluated",
                            "matched",
                            "negative",
                            "failed",
                            "skipped",
                            "countComplete",
                            "inputCoverage",
                            "truncated",
                            "stopReason",
                            "persisted",
                            "diagnostics"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "samples",
                        "totalCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Detection preview is unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "from": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "limit": {
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20
                      },
                      "runOn": {
                        "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "config": {
                        "type": "object",
                        "properties": {
                          "case_sensitive": {
                            "default": false,
                            "type": "boolean"
                          },
                          "input_pattern": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 32768
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "operator": {
                            "default": "OR",
                            "type": "string",
                            "enum": [
                              "AND",
                              "OR"
                            ]
                          },
                          "output_pattern": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 32768
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "type": {
                        "type": "string",
                        "const": "regex"
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "config",
                      "type"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "from": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "limit": {
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20
                      },
                      "runOn": {
                        "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "config": {
                        "$ref": "#/components/schemas/PublicDetectionConditionalConfigOutput"
                      },
                      "type": {
                        "type": "string",
                        "const": "conditional"
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "config",
                      "type"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "from": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "limit": {
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20
                      },
                      "runOn": {
                        "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "type": {
                        "type": "string",
                        "const": "pii"
                      },
                      "config": {
                        "type": "object",
                        "properties": {
                          "entities": {
                            "anyOf": [
                              {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "EMAIL_ADDRESS",
                                    "PHONE_NUMBER",
                                    "CREDIT_CARD",
                                    "IP_ADDRESS",
                                    "URL"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "type",
                      "config"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "from": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "limit": {
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20
                      },
                      "runOn": {
                        "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "type": {
                        "type": "string",
                        "const": "classifier"
                      },
                      "config": {
                        "type": "object",
                        "properties": {
                          "classifier_slug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "backend": {
                            "type": "string",
                            "enum": [
                              "azure",
                              "decision"
                            ]
                          },
                          "target": {
                            "type": "string",
                            "enum": [
                              "span",
                              "trace"
                            ]
                          }
                        },
                        "required": [
                          "classifier_slug"
                        ],
                        "additionalProperties": false
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "type",
                      "config"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "from": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "limit": {
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20
                      },
                      "runOn": {
                        "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "type": {
                        "type": "string",
                        "const": "custom_trained"
                      },
                      "config": {
                        "type": "object",
                        "properties": {
                          "project_id": {
                            "$ref": "#/components/schemas/PublicUuid"
                          },
                          "custom_detection_id": {
                            "$ref": "#/components/schemas/PublicUuid"
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "setfit",
                              "qlora"
                            ]
                          },
                          "artifact_uri": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "temperature": {
                            "default": 1,
                            "type": "number",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "project_id",
                          "custom_detection_id",
                          "version",
                          "method"
                        ],
                        "additionalProperties": false
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "type",
                      "config"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "from": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "limit": {
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20
                      },
                      "runOn": {
                        "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "type": {
                        "type": "string",
                        "const": "decision"
                      },
                      "config": {
                        "type": "object",
                        "properties": {
                          "criterion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4000
                          },
                          "target": {
                            "default": "span",
                            "type": "string",
                            "enum": [
                              "span",
                              "trace",
                              "session"
                            ]
                          },
                          "context": {
                            "default": "target",
                            "type": "string",
                            "enum": [
                              "target",
                              "related"
                            ]
                          }
                        },
                        "required": [
                          "criterion"
                        ],
                        "additionalProperties": false
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "type",
                      "config"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "from": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "limit": {
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20
                      },
                      "runOn": {
                        "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "type": {
                        "type": "string",
                        "const": "trace_rules"
                      },
                      "config": {
                        "$ref": "#/components/schemas/PublicDetectionTraceRulesConfigInput"
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "type",
                      "config"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "from": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "limit": {
                        "default": 20,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 20
                      },
                      "runOn": {
                        "$ref": "#/components/schemas/PublicDetectionRunOnInput"
                      },
                      "to": {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      "type": {
                        "type": "string",
                        "const": "code"
                      },
                      "config": {
                        "$ref": "#/components/schemas/PublicDetectionCodeConfigInput"
                      },
                      "threshold": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "type",
                      "config"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/trace": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Inspect one detection on a selected trace",
        "description": "List or read detections trace.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_trace",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Selected detection findings on a trace",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "detectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "revision": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "persisted": {
                          "type": "boolean",
                          "const": false
                        },
                        "mode": {
                          "type": "string",
                          "const": "inspect"
                        },
                        "results": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "detectedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "itemIndex": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "score": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "targetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "span"
                                  },
                                  "spanId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  }
                                },
                                "required": [
                                  "detectedAt",
                                  "id",
                                  "itemIndex",
                                  "reason",
                                  "score",
                                  "targetId",
                                  "traceId",
                                  "targetType",
                                  "spanId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "detectedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "itemIndex": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "score": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "targetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "trace"
                                  }
                                },
                                "required": [
                                  "detectedAt",
                                  "id",
                                  "itemIndex",
                                  "reason",
                                  "score",
                                  "targetId",
                                  "traceId",
                                  "targetType"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "detectedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "itemIndex": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "reason": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "score": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "targetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                  },
                                  "targetType": {
                                    "type": "string",
                                    "const": "session"
                                  },
                                  "sessionId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "targetRevision": {
                                    "type": "string",
                                    "pattern": "^[1-9]\\d{0,18}$"
                                  },
                                  "memberCount": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 10000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "detectedAt",
                                  "id",
                                  "itemIndex",
                                  "reason",
                                  "score",
                                  "targetId",
                                  "traceId",
                                  "targetType",
                                  "sessionId",
                                  "targetRevision",
                                  "memberCount"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "detectionId",
                        "traceId",
                        "revision",
                        "persisted",
                        "mode",
                        "results",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection or trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection or trace revision changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection evaluation unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "detectionId",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "detectionId query parameter"
          },
          {
            "name": "traceId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "description": "traceId query parameter"
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "default": "inspect",
              "type": "string",
              "const": "inspect"
            },
            "description": "mode query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Evaluate one detection on a selected trace",
        "description": "Create or trigger detections trace.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_trace",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Non-persistent selected detection outcomes",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "detectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "revision": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "persisted": {
                          "type": "boolean",
                          "const": false
                        },
                        "mode": {
                          "type": "string",
                          "const": "evaluate"
                        },
                        "outcomes": {
                          "minItems": 1,
                          "maxItems": 200,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "targetType": {
                                "type": "string",
                                "enum": [
                                  "span",
                                  "trace",
                                  "session"
                                ]
                              },
                              "targetId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "traceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "itemIndex": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "executionStatus": {
                                "type": "string",
                                "enum": [
                                  "succeeded",
                                  "failed",
                                  "skipped",
                                  "timeout"
                                ]
                              },
                              "score": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "flagged": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "reason": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2048
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "targetRevision": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^(0|[1-9]\\d{0,18})$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "memberCount": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "targetType",
                              "targetId",
                              "traceId",
                              "itemIndex",
                              "executionStatus",
                              "score",
                              "flagged",
                              "reason",
                              "targetRevision",
                              "memberCount"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "detectionId",
                        "traceId",
                        "revision",
                        "persisted",
                        "mode",
                        "outcomes"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection or trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Detection or trace revision changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Detection evaluation unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "detectionId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "traceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "mode": {
                    "type": "string",
                    "const": "evaluate"
                  }
                },
                "required": [
                  "detectionId",
                  "traceId",
                  "mode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/trace-rules/validate": {
      "post": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Validate Trace Rules and optionally evaluate one bounded sample",
        "description": "Create or trigger trace-rules validate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_detections_trace_rules_validate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Honest Trace Rules validation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean"
                        },
                        "status": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "succeeded",
                                "skipped",
                                "failed"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "matched": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "explanation": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4096
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reason": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2048
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evidence_span_ids": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          }
                        }
                      },
                      "required": [
                        "valid",
                        "status",
                        "matched",
                        "explanation",
                        "reason",
                        "evidence_span_ids"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Trace Rules validation unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rule": {
                    "$ref": "#/components/schemas/PublicDetectionTraceRulesConfigInput"
                  },
                  "sample": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "runSample": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "rule"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/detections/trends": {
      "get": {
        "tags": [
          "public",
          "detections"
        ],
        "summary": "Get bounded batch detection trends",
        "description": "List or read detections trends.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_detections_trends",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded batch detection trend buckets",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "detections": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "detectionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "buckets": {
                                "maxItems": 2200,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "count": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "start": {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    }
                                  },
                                  "required": [
                                    "count",
                                    "start"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "detectionId",
                              "buckets"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "from": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "granularity": {
                          "type": "string",
                          "enum": [
                            "hour",
                            "day",
                            "week"
                          ]
                        },
                        "targetType": {
                          "type": "string",
                          "enum": [
                            "span",
                            "trace",
                            "session",
                            "all"
                          ]
                        },
                        "to": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "detections",
                        "from",
                        "granularity",
                        "targetType",
                        "to"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Detection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "detectionIds",
            "in": "query",
            "required": true,
            "schema": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PublicUuid"
              }
            },
            "description": "detectionIds query parameter"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUtcTimestamp"
            },
            "description": "from query parameter"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "default": "day",
              "type": "string",
              "enum": [
                "hour",
                "day",
                "week"
              ]
            },
            "description": "granularity query parameter"
          },
          {
            "name": "targetType",
            "in": "query",
            "required": false,
            "schema": {
              "default": "span",
              "type": "string",
              "enum": [
                "span",
                "trace",
                "session",
                "all"
              ]
            },
            "description": "targetType query parameter"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUtcTimestamp"
            },
            "description": "to query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluation-assignments": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List my evaluation review assignments",
        "description": "List or read public evaluation-assignments.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluation_assignments",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Caller-scoped evaluation review assignments",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "assignments": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "assignmentId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "batchId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evaluationId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "itemId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "unanswered",
                                  "draft",
                                  "submitted"
                                ]
                              }
                            },
                            "required": [
                              "assignmentId",
                              "batchId",
                              "evaluationId",
                              "itemId",
                              "state"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "assignments"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation item not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "evaluationId",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId query parameter"
          },
          {
            "name": "itemId",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "itemId query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluation-cohorts": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List evaluation cohorts",
        "description": "List or read public evaluation-cohorts.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluation_cohorts",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded project evaluation cohort page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cohorts": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "completedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evaluationId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "evaluationName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "evaluatorCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "isRecurring": {
                                "type": "boolean"
                              },
                              "itemCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "progressPercent": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "reviewDeadline": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sentAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "completed"
                                ]
                              },
                              "submittedCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "submittedResponseCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "totalExpected": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "completedAt",
                              "evaluationId",
                              "evaluationName",
                              "evaluatorCount",
                              "id",
                              "isRecurring",
                              "itemCount",
                              "progressPercent",
                              "reviewDeadline",
                              "sentAt",
                              "status",
                              "submittedCount",
                              "submittedResponseCount",
                              "totalExpected"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "cohorts",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluation-form-builder/chat": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Start or continue an owned persistent form-builder conversation",
        "description": "OAuth user only, selected-project evaluation write/manage permission, Tier C compute gate and stable idempotency key. Body contains query and bounded current-form/selection context, plus optional sessionId for continuation. Actor identity and history are server-owned. A missing or foreign supplied session never creates a replacement. New admission reserves compute budget; unconfirmed replay first recovers the owned runtime receipt; already-ready replay and action-result recovery return the immutable originally confirmed response snapshot. A confirmed running snapshot never upgrades on replay. For this operation compute succeeded means confirmed response delivery, not native chat completion. Later visible conversation content is available through get_api_v1_public_evaluation_form_builder_sessions_sessionId_messages (CLI: neatlogs evaluations assistant messages <session-id>) using the same project and independent evaluation:read scope plus eval:read permission and current ownership. Messages are bounded history, not an exact turn-status API; do not poll saved results, message counts or compute success to infer native completion. Write-only chat credentials gain no history-read scope. Inspect running/completed/failed state: only completed output has atomically persisted messages and suggestion IDs. A disconnected or expired attempt never regenerates with the same key; a new key explicitly retries a failed turn. At most 100 messages/turns and 256 KiB history/receipt per session; capacity requires a new conversation. Every replay rechecks current authorization and runtime ownership. App stores only bounded turn/session identity and, for completed snapshots, a canonical response digest/reference; native output remains in its existing owned receipt and is materialized with GET only. App never copies prompt or output into its idempotency/finality/compute result storage. Missing native confirmation returns retryable 503. Requires the durable native FormBuilder turn prerequisite; does not apply or save a form.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluation_form_builder_chat",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Owned durable chat turn; inspect state before using output",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "turnId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "sessionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed"
                          ]
                        },
                        "output": {
                          "type": "object",
                          "properties": {
                            "content": {
                              "type": "string",
                              "maxLength": 16384
                            },
                            "formSuggestions": {
                              "maxItems": 20,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "form_suggestion"
                                  },
                                  "suggestion_id": {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  "message_id": {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "REPLACE_ALL",
                                      "ADD_QUESTIONS",
                                      "UPDATE_QUESTION",
                                      "REMOVE_QUESTION",
                                      "ADD",
                                      "MODIFY",
                                      "UPDATE",
                                      "REMOVE"
                                    ]
                                  },
                                  "form_name": {
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "questions": {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "maxLength": 255
                                        },
                                        "text": {
                                          "type": "string",
                                          "maxLength": 16384
                                        },
                                        "type": {
                                          "type": "string",
                                          "maxLength": 64
                                        },
                                        "description": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "maxLength": 16384
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "required": {
                                          "type": "boolean"
                                        },
                                        "config": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string",
                                            "maxLength": 64
                                          },
                                          "additionalProperties": {}
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "text",
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "reasoning": {
                                    "type": "string",
                                    "maxLength": 16384
                                  },
                                  "target_indices": {
                                    "anyOf": [
                                      {
                                        "maxItems": 100,
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "changes": {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "type": "string",
                                          "maxLength": 32
                                        },
                                        "target_id": {
                                          "type": "string",
                                          "maxLength": 255
                                        },
                                        "question": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string",
                                              "maxLength": 255
                                            },
                                            "text": {
                                              "type": "string",
                                              "maxLength": 16384
                                            },
                                            "type": {
                                              "type": "string",
                                              "maxLength": 64
                                            },
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "maxLength": 16384
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "required": {
                                              "type": "boolean"
                                            },
                                            "config": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "maxLength": 64
                                              },
                                              "additionalProperties": {}
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "text",
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "reason": {
                                          "type": "string",
                                          "maxLength": 16384
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "action"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "suggestions": {
                              "maxItems": 20,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 2048
                              }
                            }
                          },
                          "required": [
                            "content",
                            "formSuggestions",
                            "suggestions"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "turnId",
                        "sessionId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "context": {
                    "type": "object",
                    "properties": {
                      "current_page": {
                        "default": "build_form",
                        "type": "string",
                        "enum": [
                          "build_form",
                          "evals"
                        ]
                      },
                      "trace_mode": {
                        "type": "string",
                        "enum": [
                          "existing",
                          "future"
                        ]
                      },
                      "runs_on": {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string",
                            "enum": [
                              "all",
                              "types",
                              "names"
                            ]
                          },
                          "types": {
                            "anyOf": [
                              {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "names": {
                            "anyOf": [
                              {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "scope"
                        ],
                        "additionalProperties": false
                      },
                      "current_form": {
                        "default": {
                          "name": "",
                          "questions": []
                        },
                        "type": "object",
                        "properties": {
                          "name": {
                            "default": "",
                            "type": "string",
                            "maxLength": 255
                          },
                          "questions": {
                            "default": [],
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "default": "",
                                  "type": "string",
                                  "maxLength": 255
                                },
                                "text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "short_answer",
                                    "paragraph",
                                    "multiple_choice",
                                    "checkboxes",
                                    "dropdown",
                                    "linear_scale",
                                    "rating",
                                    "multiple_choice_grid",
                                    "checkbox_grid"
                                  ]
                                },
                                "description": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "required": {
                                  "default": true,
                                  "type": "boolean"
                                },
                                "config": {
                                  "default": {},
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string",
                                    "maxLength": 64
                                  },
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "text",
                                "type"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "selected_items": {
                        "anyOf": [
                          {
                            "maxItems": 10,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "item_type": {
                                  "type": "string",
                                  "enum": [
                                    "trace",
                                    "span"
                                  ]
                                },
                                "item_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "parent_trace_id": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "item_type",
                                "item_id"
                              ],
                              "additionalProperties": false
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "selection_descriptor": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "filter": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "search_query": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 4096
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sort": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "startedAt:asc",
                                      "startedAt:desc",
                                      "random"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sort_seed": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "target": {
                                "default": "traces",
                                "type": "string",
                                "enum": [
                                  "traces",
                                  "spans"
                                ]
                              },
                              "span_types": {
                                "anyOf": [
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "span_names": {
                                "anyOf": [
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "review_count": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 1000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "excluded_item_ids": {
                                "default": [],
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              }
                            },
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "selection_summary": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "explicit",
                                  "allMatching"
                                ]
                              },
                              "target": {
                                "type": "string",
                                "enum": [
                                  "traces",
                                  "spans"
                                ]
                              },
                              "totalItems": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              },
                              "spanCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              }
                            },
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "filters": {
                        "anyOf": [
                          {
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "operator": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "operator",
                                "value"
                              ]
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ends_at": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "batch_schedule": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "mode": {
                        "default": "fast",
                        "type": "string",
                        "enum": [
                          "fast",
                          "pro"
                        ]
                      }
                    },
                    "required": [
                      "trace_mode",
                      "runs_on"
                    ],
                    "additionalProperties": false
                  },
                  "sessionId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "query",
                  "context"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluation-form-builder/preview": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Preview AI-assisted form additions, edits or removals",
        "description": "Create or trigger evaluation-form-builder preview.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluation_form_builder_preview",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Generated form-edit suggestions; no form or conversation is saved",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string",
                          "maxLength": 16384
                        },
                        "formSuggestions": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "form_suggestion"
                              },
                              "suggestion_id": {
                                "type": "string",
                                "maxLength": 255
                              },
                              "message_id": {
                                "type": "string",
                                "maxLength": 255
                              },
                              "action": {
                                "type": "string",
                                "enum": [
                                  "REPLACE_ALL",
                                  "ADD_QUESTIONS",
                                  "UPDATE_QUESTION",
                                  "REMOVE_QUESTION",
                                  "ADD",
                                  "MODIFY",
                                  "UPDATE",
                                  "REMOVE"
                                ]
                              },
                              "form_name": {
                                "type": "string",
                                "maxLength": 1024
                              },
                              "questions": {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "maxLength": 255
                                    },
                                    "text": {
                                      "type": "string",
                                      "maxLength": 16384
                                    },
                                    "type": {
                                      "type": "string",
                                      "maxLength": 64
                                    },
                                    "description": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 16384
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "required": {
                                      "type": "boolean"
                                    },
                                    "config": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "maxLength": 64
                                      },
                                      "additionalProperties": {}
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "text",
                                    "type"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "reasoning": {
                                "type": "string",
                                "maxLength": 16384
                              },
                              "target_indices": {
                                "anyOf": [
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "changes": {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "op": {
                                      "type": "string",
                                      "maxLength": 32
                                    },
                                    "target_id": {
                                      "type": "string",
                                      "maxLength": 255
                                    },
                                    "question": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "maxLength": 255
                                        },
                                        "text": {
                                          "type": "string",
                                          "maxLength": 16384
                                        },
                                        "type": {
                                          "type": "string",
                                          "maxLength": 64
                                        },
                                        "description": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "maxLength": 16384
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "required": {
                                          "type": "boolean"
                                        },
                                        "config": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string",
                                            "maxLength": 64
                                          },
                                          "additionalProperties": {}
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "text",
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "reason": {
                                      "type": "string",
                                      "maxLength": 16384
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "suggestions": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 2048
                          }
                        }
                      },
                      "required": [
                        "content",
                        "formSuggestions",
                        "suggestions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "context": {
                    "type": "object",
                    "properties": {
                      "current_page": {
                        "default": "build_form",
                        "type": "string",
                        "enum": [
                          "build_form",
                          "evals"
                        ]
                      },
                      "trace_mode": {
                        "type": "string",
                        "enum": [
                          "existing",
                          "future"
                        ]
                      },
                      "runs_on": {
                        "type": "object",
                        "properties": {
                          "scope": {
                            "type": "string",
                            "enum": [
                              "all",
                              "types",
                              "names"
                            ]
                          },
                          "types": {
                            "anyOf": [
                              {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "names": {
                            "anyOf": [
                              {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "scope"
                        ],
                        "additionalProperties": false
                      },
                      "current_form": {
                        "default": {
                          "name": "",
                          "questions": []
                        },
                        "type": "object",
                        "properties": {
                          "name": {
                            "default": "",
                            "type": "string",
                            "maxLength": 255
                          },
                          "questions": {
                            "default": [],
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "default": "",
                                  "type": "string",
                                  "maxLength": 255
                                },
                                "text": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "short_answer",
                                    "paragraph",
                                    "multiple_choice",
                                    "checkboxes",
                                    "dropdown",
                                    "linear_scale",
                                    "rating",
                                    "multiple_choice_grid",
                                    "checkbox_grid"
                                  ]
                                },
                                "description": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "required": {
                                  "default": true,
                                  "type": "boolean"
                                },
                                "config": {
                                  "default": {},
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string",
                                    "maxLength": 64
                                  },
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "text",
                                "type"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "selected_items": {
                        "anyOf": [
                          {
                            "maxItems": 10,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "item_type": {
                                  "type": "string",
                                  "enum": [
                                    "trace",
                                    "span"
                                  ]
                                },
                                "item_id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "parent_trace_id": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "item_type",
                                "item_id"
                              ],
                              "additionalProperties": false
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "selection_descriptor": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "filter": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "from": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "to": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "search_query": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 4096
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sort": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "startedAt:asc",
                                      "startedAt:desc",
                                      "random"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sort_seed": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "target": {
                                "default": "traces",
                                "type": "string",
                                "enum": [
                                  "traces",
                                  "spans"
                                ]
                              },
                              "span_types": {
                                "anyOf": [
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "span_names": {
                                "anyOf": [
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "review_count": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 1000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "excluded_item_ids": {
                                "default": [],
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              }
                            },
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "selection_summary": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "explicit",
                                  "allMatching"
                                ]
                              },
                              "target": {
                                "type": "string",
                                "enum": [
                                  "traces",
                                  "spans"
                                ]
                              },
                              "totalItems": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              },
                              "spanCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              }
                            },
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "filters": {
                        "anyOf": [
                          {
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "operator": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "value": {}
                              },
                              "required": [
                                "field",
                                "operator",
                                "value"
                              ]
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ends_at": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "batch_schedule": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 255
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "mode": {
                        "default": "fast",
                        "type": "string",
                        "enum": [
                          "fast",
                          "pro"
                        ]
                      }
                    },
                    "required": [
                      "trace_mode",
                      "runs_on"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "query",
                  "context"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluation-form-builder/sessions": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List the current user's recent evaluation form-builder sessions",
        "description": "List or read evaluation-form-builder sessions.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluation_form_builder_sessions",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "The app's latest 20 personal sessions; bounded window, not full pagination",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "sessions": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "title": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "messageCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "createdAt": {
                                "type": "string",
                                "maxLength": 128
                              },
                              "updatedAt": {
                                "type": "string",
                                "maxLength": 128
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "messageCount",
                              "createdAt",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "historyWindow": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "mayHaveMore": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "limit",
                            "mayHaveMore"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "sessions",
                        "historyWindow"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluation-form-builder/sessions/{sessionId}": {
      "delete": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Delete the current user's evaluation form-builder session",
        "description": "OAuth user only, selected-project evaluation write/manage permission. Empty JSON body and idempotency key required. Deletes only the current user's FormBuilder session in that project. A completed or uncertain same-key request rechecks current authorization and recovers through the runtime's owned tombstone; a missing or foreign session stays unavailable. Deleted history remains unavailable even after failed cache cleanup. No session content or identity selectors are accepted. Requires the runtime owned-session mutation prerequisite; a runtime without tombstone recovery fails closed on retry.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_evaluation_form_builder_sessions_sessionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Owned session soft-deletion confirmed by the runtime",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "sessionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "sessionId",
                        "deleted"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "sessionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/public/evaluation-form-builder/sessions/{sessionId}/messages": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Read the current user's evaluation form-builder session history",
        "description": "Fetch a specific sessions messages.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluation_form_builder_sessions_sessionId_messages",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Owned form-builder history, at most 100 visible messages; system and thinking messages excluded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "session": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "title": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "messageCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "createdAt": {
                              "type": "string",
                              "maxLength": 128
                            },
                            "updatedAt": {
                              "type": "string",
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "id",
                            "title",
                            "messageCount",
                            "createdAt",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        },
                        "messages": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "assistant",
                                  "form_suggestion",
                                  "form_applied",
                                  "suggestions"
                                ]
                              },
                              "content": {
                                "type": "string",
                                "maxLength": 16384
                              },
                              "createdAt": {
                                "type": "string",
                                "maxLength": 128
                              },
                              "suggestion": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "const": "form_suggestion"
                                  },
                                  "suggestion_id": {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  "message_id": {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "REPLACE_ALL",
                                      "ADD_QUESTIONS",
                                      "UPDATE_QUESTION",
                                      "REMOVE_QUESTION",
                                      "ADD",
                                      "MODIFY",
                                      "UPDATE",
                                      "REMOVE"
                                    ]
                                  },
                                  "form_name": {
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  "questions": {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string",
                                          "maxLength": 255
                                        },
                                        "text": {
                                          "type": "string",
                                          "maxLength": 16384
                                        },
                                        "type": {
                                          "type": "string",
                                          "maxLength": 64
                                        },
                                        "description": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "maxLength": 16384
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "required": {
                                          "type": "boolean"
                                        },
                                        "config": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string",
                                            "maxLength": 64
                                          },
                                          "additionalProperties": {}
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "text",
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "reasoning": {
                                    "type": "string",
                                    "maxLength": 16384
                                  },
                                  "target_indices": {
                                    "anyOf": [
                                      {
                                        "maxItems": 100,
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "changes": {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "op": {
                                          "type": "string",
                                          "maxLength": 32
                                        },
                                        "target_id": {
                                          "type": "string",
                                          "maxLength": 255
                                        },
                                        "question": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string",
                                              "maxLength": 255
                                            },
                                            "text": {
                                              "type": "string",
                                              "maxLength": 16384
                                            },
                                            "type": {
                                              "type": "string",
                                              "maxLength": 64
                                            },
                                            "description": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "maxLength": 16384
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "required": {
                                              "type": "boolean"
                                            },
                                            "config": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "maxLength": 64
                                              },
                                              "additionalProperties": {}
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "text",
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "reason": {
                                          "type": "string",
                                          "maxLength": 16384
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "action"
                                ],
                                "additionalProperties": false
                              },
                              "suggestions": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 2048
                                }
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "accepted",
                                  "rejected"
                                ]
                              },
                              "acceptedQuestionIds": {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 255
                                }
                              },
                              "skippedQuestionIds": {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 255
                                }
                              }
                            },
                            "required": [
                              "id",
                              "role",
                              "content",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "historyWindow": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "mayHaveMore": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "limit",
                            "mayHaveMore"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "session",
                        "messages",
                        "historyWindow"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "sessionId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluation-form-builder/sessions/{sessionId}/messages/{messageId}/decision": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Accept or reject an owned form-builder suggestion with durable replay",
        "description": "OAuth user only, selected-project evaluation write/manage permission and stable idempotency key. Body contains accepted or rejected status and optional accepted_question_ids/skipped_question_ids. IDs must be bounded, distinct, disjoint and belong to this suggestion. This records the decision in personal history; applying form changes still uses the form replacement operation. Every retry rechecks current authorization and confirms the original immutable runtime receipt, even after a later different decision. Deleted or foreign targets stay unavailable. Runtime receipts retain eight days, with at most 100 live receipts and 256 KiB per suggestion; current receipts are not evicted to make room. Missing confirmation returns retryable 503. Requires the AI durable-decision prerequisite; does not create a conversation or invoke a model.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluation_form_builder_sessions_sessionId_messages_messageId_decision",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Owned suggestion decision confirmed by its durable runtime receipt",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "sessionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "messageId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "decisionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "accepted",
                            "rejected"
                          ]
                        },
                        "acceptedQuestionIds": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          }
                        },
                        "skippedQuestionIds": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          }
                        }
                      },
                      "required": [
                        "sessionId",
                        "messageId",
                        "decisionId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "sessionId path parameter"
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "messageId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accepted_question_ids": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  "skipped_question_ids": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "rejected"
                    ]
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluation-schedules": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List evaluation schedules",
        "description": "List or read public evaluation-schedules.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluation_schedules",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded recurring evaluation schedule page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "schedules": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "batchCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              },
                              "cadence": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20
                              },
                              "createdAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "endsAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "nextRunAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "recipientCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              },
                              "reminderConfig": {
                                "anyOf": [
                                  {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "frequency": {
                                            "type": "string",
                                            "const": "custom"
                                          },
                                          "intervalHours": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 168
                                          },
                                          "time": {
                                            "type": "string",
                                            "pattern": "^(?:(?:0?[1-9]|1[0-2]):[0-5]\\d\\s?(?:AM|PM)|(?:[01]?\\d|2[0-3]):[0-5]\\d)$"
                                          }
                                        },
                                        "required": [
                                          "frequency",
                                          "intervalHours",
                                          "time"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "frequency": {
                                            "type": "string",
                                            "enum": [
                                              "none",
                                              "every-day",
                                              "halfway",
                                              "one-day-before"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "frequency"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "reviewDuration": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 20
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "startsAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "active",
                                  "completed",
                                  "archived"
                                ]
                              }
                            },
                            "required": [
                              "batchCount",
                              "cadence",
                              "createdAt",
                              "endsAt",
                              "id",
                              "name",
                              "nextRunAt",
                              "recipientCount",
                              "reminderConfig",
                              "reviewDuration",
                              "startsAt",
                              "status"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "schedules"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored evaluation schedule cannot be represented by the Public API",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "default": "all",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "draft",
                    "active",
                    "completed",
                    "archived"
                  ]
                },
                {
                  "type": "string",
                  "const": "all"
                }
              ]
            },
            "description": "status query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluation-schedules/{scheduleId}": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get an evaluation schedule",
        "description": "Fetch a specific public evaluation-schedules.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluation_schedules_scheduleId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Recurring evaluation schedule metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batchCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        "cadence": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "endsAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "nextRunAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "recipientCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        "reminderConfig": {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "frequency": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "intervalHours": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 168
                                    },
                                    "time": {
                                      "type": "string",
                                      "pattern": "^(?:(?:0?[1-9]|1[0-2]):[0-5]\\d\\s?(?:AM|PM)|(?:[01]?\\d|2[0-3]):[0-5]\\d)$"
                                    }
                                  },
                                  "required": [
                                    "frequency",
                                    "intervalHours",
                                    "time"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "frequency": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "every-day",
                                        "halfway",
                                        "one-day-before"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "frequency"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reviewDuration": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "startsAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "completed",
                            "archived"
                          ]
                        }
                      },
                      "required": [
                        "batchCount",
                        "cadence",
                        "createdAt",
                        "endsAt",
                        "id",
                        "name",
                        "nextRunAt",
                        "recipientCount",
                        "reminderConfig",
                        "reviewDuration",
                        "startsAt",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation schedule not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored evaluation schedule cannot be represented by the Public API",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "scheduleId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluation-templates": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List system and personal evaluation templates",
        "description": "List or read public evaluation-templates.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluation_templates",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "List system and personal evaluation templates",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "templates": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 4096
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "isSystem": {
                                "type": "boolean"
                              },
                              "createdBy": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "description",
                              "isSystem",
                              "createdBy",
                              "createdAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "templates",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored template exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Create a personal evaluation template",
        "description": "Create or trigger public evaluation-templates.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluation_templates",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Create a personal evaluation template",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4096
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isSystem": {
                          "type": "boolean"
                        },
                        "createdBy": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "isSystem",
                        "createdBy",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored template exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4096
                  },
                  "questions": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "answerType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "questionText": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 16384
                        },
                        "options": {}
                      },
                      "required": [
                        "answerType",
                        "questionText"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "name",
                  "questions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluation-templates/{templateId}": {
      "delete": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Delete an owned evaluation template",
        "description": "Delete public evaluation-templates.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_evaluation_templates_templateId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Delete an owned evaluation template",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored template exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "templateId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get an accessible evaluation template",
        "description": "Fetch a specific public evaluation-templates.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluation_templates_templateId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Get an accessible evaluation template",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4096
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isSystem": {
                          "type": "boolean"
                        },
                        "createdBy": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "questions": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "answerType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "questionText": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 16384
                              },
                              "options": {}
                            },
                            "required": [
                              "answerType",
                              "questionText"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "isSystem",
                        "createdBy",
                        "createdAt",
                        "questions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored template exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "templateId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "put": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Update an owned evaluation template",
        "description": "Replace/update public evaluation-templates.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "put_api_v1_public_evaluation_templates_templateId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Update an owned evaluation template",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4096
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isSystem": {
                          "type": "boolean"
                        },
                        "createdBy": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "isSystem",
                        "createdBy",
                        "createdAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored template exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "templateId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4096
                  },
                  "questions": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "answerType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "questionText": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 16384
                        },
                        "options": {}
                      },
                      "required": [
                        "answerType",
                        "questionText"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List evaluations",
        "description": "List or read public evaluations.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded evaluation catalog page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "isRecurring": {
                                "type": "boolean"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "active",
                                  "completed",
                                  "archived"
                                ]
                              },
                              "traceSource": {
                                "type": "string",
                                "enum": [
                                  "existing",
                                  "future"
                                ]
                              },
                              "type": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20
                              },
                              "updatedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "createdAt",
                              "id",
                              "isRecurring",
                              "name",
                              "status",
                              "traceSource",
                              "type",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "evaluations",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "default": "all",
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "draft",
                    "active",
                    "completed",
                    "archived"
                  ]
                },
                {
                  "type": "string",
                  "const": "all"
                }
              ]
            },
            "description": "status query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Create an evaluation draft",
        "description": "Create or trigger public evaluations.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Evaluation created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isRecurring": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "completed",
                            "archived"
                          ]
                        },
                        "traceSource": {
                          "type": "string",
                          "enum": [
                            "existing",
                            "future"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "isRecurring",
                        "name",
                        "status",
                        "traceSource",
                        "type",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batchSchedule": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^(?:[1-9]|[1-9]\\d{1,2}|[1-7]\\d{3}|8[0-6]\\d{2}|87[0-5]\\d|8760)h$"
                          },
                          {
                            "type": "string",
                            "pattern": "^(?:[1-9]|[1-9]\\d|[12]\\d{2}|3[0-5]\\d|36[0-5])d$"
                          },
                          {
                            "type": "string",
                            "pattern": "^(?:[1-9]|[1-4]\\d|5[0-2])w$"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dailyLimit": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "endsAt": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "experimentId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  },
                  "reviewDuration": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-9]\\d{1,2}|[1-7]\\d{3}|8[0-6]\\d{2}|87[0-5]\\d|8760)h$"
                      },
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-9]\\d|[12]\\d{2}|3[0-5]\\d|36[0-5])d$"
                      },
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-4]\\d|5[0-2])w$"
                      }
                    ]
                  },
                  "samplingRate": {
                    "default": 100,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "sendFrequency": {
                    "type": "string",
                    "enum": [
                      "immediate",
                      "batched",
                      "manual"
                    ]
                  },
                  "startsAt": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "traceFilter": {},
                  "traceSource": {
                    "default": "existing",
                    "type": "string",
                    "enum": [
                      "existing",
                      "future"
                    ]
                  },
                  "type": {
                    "default": "human",
                    "type": "string",
                    "enum": [
                      "human",
                      "ai"
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false,
                "anyOf": [
                  {
                    "properties": {
                      "traceSource": {
                        "const": "existing"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "anyOf": [
                      {
                        "properties": {
                          "batchSchedule": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "batchSchedule"
                        ],
                        "type": "object"
                      },
                      {
                        "properties": {
                          "endsAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "endsAt"
                        ],
                        "type": "object"
                      }
                    ],
                    "properties": {
                      "sendFrequency": {
                        "const": "batched"
                      },
                      "traceFilter": {
                        "type": "object",
                        "properties": {
                          "cost_max": {
                            "type": "number"
                          },
                          "cost_min": {
                            "type": "number"
                          },
                          "datasetKeyword": {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "date_range": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "to": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            }
                          },
                          "detectionNameContains": {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "detectionNames": {
                            "minItems": 1,
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "pattern": "\\S"
                            }
                          },
                          "endUserIdContains": {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "endUserIds": {
                            "minItems": 1,
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "pattern": "\\S"
                            }
                          },
                          "latency_max_ms": {
                            "type": "number"
                          },
                          "latency_min_ms": {
                            "type": "number"
                          },
                          "runsOnSpanNames": {
                            "minItems": 1,
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "pattern": "\\S"
                            }
                          },
                          "runsOnSpanTypes": {
                            "minItems": 1,
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "pattern": "\\S"
                            }
                          },
                          "sessionIdContains": {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "sessionIds": {
                            "minItems": 1,
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "pattern": "\\S"
                            }
                          },
                          "span_names": {
                            "minItems": 1,
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "pattern": "\\S"
                            }
                          },
                          "span_types": {
                            "minItems": 1,
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "pattern": "\\S"
                            }
                          },
                          "spans_max": {
                            "type": "number"
                          },
                          "spans_min": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "\\S"
                          },
                          "tags": {
                            "minItems": 1,
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "pattern": "\\S"
                            }
                          },
                          "workflowName": {
                            "type": "string",
                            "minLength": 1,
                            "pattern": "\\S"
                          }
                        },
                        "additionalProperties": false
                      },
                      "traceSource": {
                        "const": "future"
                      }
                    },
                    "required": [
                      "traceSource"
                    ],
                    "type": "object"
                  }
                ],
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "properties": {
                          "traceSource": {
                            "const": "existing"
                          }
                        },
                        "type": "object"
                      },
                      {
                        "anyOf": [
                          {
                            "properties": {
                              "batchSchedule": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "batchSchedule"
                            ]
                          },
                          {
                            "properties": {
                              "endsAt": {
                                "format": "date-time",
                                "type": "string"
                              }
                            },
                            "required": [
                              "endsAt"
                            ]
                          }
                        ],
                        "properties": {
                          "sendFrequency": {
                            "const": "batched"
                          },
                          "traceFilter": {
                            "type": "object",
                            "properties": {
                              "cost_max": {
                                "type": "number"
                              },
                              "cost_min": {
                                "type": "number"
                              },
                              "datasetKeyword": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "date_range": {
                                "type": "object",
                                "properties": {
                                  "from": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "to": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  }
                                }
                              },
                              "detectionNameContains": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "detectionNames": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "endUserIdContains": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "endUserIds": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "latency_max_ms": {
                                "type": "number"
                              },
                              "latency_min_ms": {
                                "type": "number"
                              },
                              "runsOnSpanNames": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "runsOnSpanTypes": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "sessionIdContains": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "sessionIds": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "span_names": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "span_types": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "spans_max": {
                                "type": "number"
                              },
                              "spans_min": {
                                "type": "number"
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "tags": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "workflowName": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              }
                            },
                            "additionalProperties": false
                          },
                          "traceSource": {
                            "const": "future"
                          }
                        },
                        "required": [
                          "traceSource"
                        ],
                        "type": "object"
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluations-stats": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get evaluation statistics",
        "description": "List or read public evaluations-stats.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_stats",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded evaluation aggregate statistics",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "averageScore": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completionRate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "evaluations": {
                          "type": "object",
                          "properties": {
                            "active": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "archived": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "completed": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "draft": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "total": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "active",
                            "archived",
                            "completed",
                            "draft",
                            "total"
                          ],
                          "additionalProperties": false
                        },
                        "period": {
                          "type": "string",
                          "enum": [
                            "24h",
                            "7d",
                            "30d",
                            "90d",
                            "all"
                          ]
                        },
                        "submittedResponses": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "averageScore",
                        "completionRate",
                        "evaluations",
                        "period",
                        "submittedResponses"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "default": "30d",
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "90d",
                "all"
              ]
            },
            "description": "period query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluations/{evaluationId}": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get an evaluation",
        "description": "Fetch a specific public evaluations.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isRecurring": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "completed",
                            "archived"
                          ]
                        },
                        "traceSource": {
                          "type": "string",
                          "enum": [
                            "existing",
                            "future"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "batchSchedule": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "dailyLimit": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32768
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "endsAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "nextBatchAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "notificationConfig": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "channels": {
                                  "maxItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "slack",
                                      "email"
                                    ]
                                  }
                                }
                              },
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "queuedItemCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "reminderConfig": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "frequency": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "every-day",
                                    "halfway",
                                    "one-day-before",
                                    "custom"
                                  ]
                                },
                                "intervalHours": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "time": {
                                  "type": "string",
                                  "maxLength": 32
                                }
                              },
                              "required": [
                                "frequency"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reviewDeadline": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reviewDuration": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "samplingRate": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "sendFrequency": {
                          "type": "string",
                          "enum": [
                            "immediate",
                            "batched",
                            "manual"
                          ]
                        },
                        "sentAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "startsAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "traceFilter": {
                          "anyOf": [
                            {},
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "isRecurring",
                        "name",
                        "status",
                        "traceSource",
                        "type",
                        "updatedAt",
                        "batchSchedule",
                        "dailyLimit",
                        "description",
                        "endsAt",
                        "nextBatchAt",
                        "notificationConfig",
                        "queuedItemCount",
                        "reminderConfig",
                        "reviewDeadline",
                        "reviewDuration",
                        "samplingRate",
                        "sendFrequency",
                        "sentAt",
                        "startsAt",
                        "traceFilter"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Update an owned evaluation",
        "description": "Partially update public evaluations.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_evaluations_evaluationId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isRecurring": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "completed",
                            "archived"
                          ]
                        },
                        "traceSource": {
                          "type": "string",
                          "enum": [
                            "existing",
                            "future"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "isRecurring",
                        "name",
                        "status",
                        "traceSource",
                        "type",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batchSchedule": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^(?:[1-9]|[1-9]\\d{1,2}|[1-7]\\d{3}|8[0-6]\\d{2}|87[0-5]\\d|8760)h$"
                          },
                          {
                            "type": "string",
                            "pattern": "^(?:[1-9]|[1-9]\\d|[12]\\d{2}|3[0-5]\\d|36[0-5])d$"
                          },
                          {
                            "type": "string",
                            "pattern": "^(?:[1-9]|[1-4]\\d|5[0-2])w$"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dailyLimit": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "endsAt": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  },
                  "reviewDuration": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-9]\\d{1,2}|[1-7]\\d{3}|8[0-6]\\d{2}|87[0-5]\\d|8760)h$"
                      },
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-9]\\d|[12]\\d{2}|3[0-5]\\d|36[0-5])d$"
                      },
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-4]\\d|5[0-2])w$"
                      }
                    ]
                  },
                  "samplingRate": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "sendFrequency": {
                    "type": "string",
                    "enum": [
                      "immediate",
                      "batched",
                      "manual"
                    ]
                  },
                  "startsAt": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "traceFilter": {
                    "anyOf": [
                      {},
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "traceSource": {
                    "type": "string",
                    "enum": [
                      "existing",
                      "future"
                    ]
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "properties": {
                      "traceSource": {
                        "const": "existing"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "properties": {
                      "sendFrequency": {
                        "const": "batched"
                      },
                      "traceFilter": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "cost_max": {
                                "type": "number"
                              },
                              "cost_min": {
                                "type": "number"
                              },
                              "datasetKeyword": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "date_range": {
                                "type": "object",
                                "properties": {
                                  "from": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "to": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  }
                                }
                              },
                              "detectionNameContains": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "detectionNames": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "endUserIdContains": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "endUserIds": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "latency_max_ms": {
                                "type": "number"
                              },
                              "latency_min_ms": {
                                "type": "number"
                              },
                              "runsOnSpanNames": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "runsOnSpanTypes": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "sessionIdContains": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "sessionIds": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "span_names": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "span_types": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "spans_max": {
                                "type": "number"
                              },
                              "spans_min": {
                                "type": "number"
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              },
                              "tags": {
                                "minItems": 1,
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "pattern": "\\S"
                                }
                              },
                              "workflowName": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "\\S"
                              }
                            },
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "traceSource": {
                        "const": "future"
                      }
                    },
                    "required": [
                      "traceSource"
                    ],
                    "type": "object"
                  }
                ],
                "minProperties": 1
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/activate": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Activate an owned evaluation for project members and opted-in guest or AI reviewers",
        "description": "Set includeAiReviewers to activate retained AI assignments, including Auto Review with an empty reviewerUserIds list. AI forms materialize before the first batch snapshot. Optional reminderConfig selects none, every-day, halfway, one-day-before or custom (1-168 intervalHours and a local time, using creator profile timezone then project timezone then UTC). Optional notifications selects unique email/slack channels for member lifecycle notifications; [] disables those external channels while in-app notifications remain. Set sendGuestInvitations=true with includeGuestReviewers=true to durably queue guest invitations for the initial review window and future dispatched batches. guestInvitationCount counts queued records; guestInvitationsEnabled confirms future batch delivery is enabled. Read guest-invitations for provider acceptance; queued is not email delivery. Guest reminders follow the existing separate guest rules. Omitted settings preserve stored values. Active confirms lifecycle and settings persistence, not provider acceptance or delivery; asynchronous execution and reminders use the existing app dispatcher and workers. Code evaluators retain capability and Auto Review-only restrictions.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_activate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation activated for selected members and explicitly included retained guest/AI reviewers",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "assignedItemCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "guestInvitationCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "guestInvitationsEnabled": {
                          "type": "boolean"
                        },
                        "firstBatch": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "itemCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 1000
                                },
                                "reviewDeadline": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "sentAt": {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                }
                              },
                              "required": [
                                "id",
                                "itemCount",
                                "reviewDeadline",
                                "sentAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "nextBatchAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reviewerCount": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "reviewDeadline": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reviewDuration": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(?:[1-9]|[1-9]\\d{1,2}|[1-7]\\d{3}|8[0-6]\\d{2}|87[0-5]\\d|8760)h$"
                            },
                            {
                              "type": "string",
                              "pattern": "^(?:[1-9]|[1-9]\\d|[12]\\d{2}|3[0-5]\\d|36[0-5])d$"
                            },
                            {
                              "type": "string",
                              "pattern": "^(?:[1-9]|[1-4]\\d|5[0-2])w$"
                            }
                          ]
                        },
                        "startsAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "const": "active"
                        },
                        "traceSource": {
                          "type": "string",
                          "enum": [
                            "existing",
                            "future"
                          ]
                        }
                      },
                      "required": [
                        "assignedItemCount",
                        "evaluationId",
                        "firstBatch",
                        "nextBatchAt",
                        "reviewerCount",
                        "reviewDeadline",
                        "reviewDuration",
                        "startsAt",
                        "status",
                        "traceSource"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation activation conflict or acknowledged bounds exceeded",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "includeAiReviewers": {
                    "type": "boolean"
                  },
                  "includeGuestReviewers": {
                    "type": "boolean"
                  },
                  "sendGuestInvitations": {
                    "type": "boolean"
                  },
                  "maxAssignments": {
                    "default": 10000,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "maxItems": {
                    "default": 1000,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  },
                  "notifications": {
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "slack",
                        "email"
                      ]
                    }
                  },
                  "reminderConfig": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "frequency": {
                            "type": "string",
                            "const": "custom"
                          },
                          "intervalHours": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 168
                          },
                          "time": {
                            "type": "string",
                            "pattern": "^(?:(?:0?[1-9]|1[0-2]):[0-5]\\d\\s?(?:AM|PM)|(?:[01]?\\d|2[0-3]):[0-5]\\d)$"
                          }
                        },
                        "required": [
                          "frequency",
                          "intervalHours",
                          "time"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "frequency": {
                            "type": "string",
                            "enum": [
                              "none",
                              "every-day",
                              "halfway",
                              "one-day-before"
                            ]
                          }
                        },
                        "required": [
                          "frequency"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "reviewerUserIds": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  },
                  "reviewDuration": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-9]\\d{1,2}|[1-7]\\d{3}|8[0-6]\\d{2}|87[0-5]\\d|8760)h$"
                      },
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-9]\\d|[12]\\d{2}|3[0-5]\\d|36[0-5])d$"
                      },
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-4]\\d|5[0-2])w$"
                      }
                    ]
                  }
                },
                "required": [
                  "reviewerUserIds",
                  "reviewDuration"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/ai-dispatches": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Dispatch or retry AI work for an owned active evaluation",
        "description": "Explicit bounded AI dispatch/retry using the app worker and its per-item deduplication. Select batchId for recurring/future evaluations. Requires an active open review window and frozen batch roster. Queue or metering failures return retryable 503; retry the same idempotency key. Accepted means queue acceptance, not completed provider execution. Retries can republish envelopes; worker deduplication prevents ordinary duplicate processing, not an exactly-once provider guarantee.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_ai_dispatches",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "AI dispatch accepted by the queue",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "batchId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "dispatchStatus": {
                          "type": "string",
                          "const": "accepted"
                        }
                      },
                      "required": [
                        "evaluationId",
                        "batchId",
                        "dispatchStatus"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation or reviewer not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation roster cannot be changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batchId": {
                    "default": null,
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxItems": {
                    "default": 1000,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  },
                  "maxAssignments": {
                    "default": 10000,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/ai-insights": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Read paginated campaign AI insights",
        "description": "OAuth selected-project evaluation reader with current app evaluation visibility. Stable descending timestamp/id cursor is bound to actor, project and campaign; concurrent updates may change run state. Metrics cover only the returned page, not the full campaign. Verdicts above 32 KiB are omitted with explicit incomplete metrics; reasoning and scalar answer prefixes, field count and evidence references have explicit truncation. No raw provider errors, trace content, tool arguments/results or guest tokens. Response cap 1 MiB minus envelope allowance; reduce page size after 413.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_ai_insights",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Campaign insight page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "runs": {
                          "maxItems": 25,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "definitionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "definitionName": {
                                "type": "string",
                                "maxLength": 255
                              },
                              "itemId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "traceId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "spanId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "running",
                                  "succeeded",
                                  "failed"
                                ]
                              },
                              "passed": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "overallScore": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "reasoning": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 4000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "reasoningTruncated": {
                                "type": "boolean"
                              },
                              "fields": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "maxLength": 160
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 4000
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "valueOmitted": {
                                      "type": "boolean"
                                    },
                                    "truncated": {
                                      "type": "boolean"
                                    },
                                    "score": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "confidence": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "reasoning": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 1000
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "evidenceRefs": {
                                      "maxItems": 20,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "maxLength": 255
                                      }
                                    },
                                    "offList": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "value",
                                    "valueOmitted",
                                    "truncated",
                                    "score",
                                    "confidence",
                                    "reasoning",
                                    "evidenceRefs",
                                    "offList"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "verdictTruncated": {
                                "type": "boolean"
                              },
                              "toolCalls": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "durationMs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "completedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "errorCode": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "EVALUATOR_RUN_FAILED"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "definitionId",
                              "definitionName",
                              "itemId",
                              "traceId",
                              "spanId",
                              "status",
                              "passed",
                              "overallScore",
                              "reasoning",
                              "reasoningTruncated",
                              "fields",
                              "verdictTruncated",
                              "toolCalls",
                              "durationMs",
                              "createdAt",
                              "completedAt",
                              "errorCode"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "evaluators": {
                          "maxItems": 25,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "definitionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "definitionName": {
                                "type": "string",
                                "maxLength": 255
                              },
                              "totalRuns": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "succeeded": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "failed": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "passRate": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "avgScore": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "avgDurationMs": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "totalToolCalls": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "definitionId",
                              "definitionName",
                              "totalRuns",
                              "succeeded",
                              "failed",
                              "passRate",
                              "avgScore",
                              "avgDurationMs",
                              "totalToolCalls"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "metricsScope": {
                          "type": "string",
                          "const": "page"
                        },
                        "metricsIncomplete": {
                          "type": "boolean"
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "runs",
                        "evaluators",
                        "metricsScope",
                        "metricsIncomplete",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Insight page exceeds response limit",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 10,
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/ai-metrics": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Read full-campaign AI evaluator metrics",
        "description": "OAuth evaluation reader with current App visibility. Each evaluator aggregate covers every campaign run, including large verdicts omitted by the insight page. Definitions paginate by ascending ID; actor/project/campaign-bound cursors. Each response uses one database statement snapshot and returns computedAt. Concurrent execution can change metrics between pages. No reasoning, tool payloads or provider errors are loaded.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_ai_metrics",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Full-campaign metrics",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluators": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "definitionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "definitionName": {
                                "type": "string",
                                "maxLength": 255
                              },
                              "totalRuns": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "succeeded": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "failed": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "passRate": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "avgScore": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "avgDurationMs": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "totalToolCalls": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "definitionId",
                              "definitionName",
                              "totalRuns",
                              "succeeded",
                              "failed",
                              "passRate",
                              "avgScore",
                              "avgDurationMs",
                              "totalToolCalls"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "metricsScope": {
                          "type": "string",
                          "const": "campaign"
                        },
                        "computedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "evaluators",
                        "metricsScope",
                        "computedAt",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/archive": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Archive an owned active or completed evaluation",
        "description": "Archives active/completed evaluations while preserving responses and frozen batch history. Drafts require the separate discard operation. Already archived evaluations succeed without modifying history. Requires exact evaluation UUID confirmation.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_archive",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Owned evaluation archived",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "const": "archived"
                        }
                      },
                      "required": [
                        "evaluationId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation cannot be archived",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "List persisted evaluation batches",
        "description": "Fetch a specific evaluations batches.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_batches",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation batches",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batches": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "batchNumber": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 9007199254740991
                              },
                              "completedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "displayState": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "in_progress",
                                  "done",
                                  "overdue",
                                  "cancelled",
                                  "emptyRun"
                                ]
                              },
                              "evaluationId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "evaluatorCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "itemCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "progressPercent": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "reviewDeadline": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sentAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              },
                              "submittedCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "totalExpected": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "batchNumber",
                              "completedAt",
                              "displayState",
                              "evaluationId",
                              "evaluatorCount",
                              "id",
                              "itemCount",
                              "progressPercent",
                              "reviewDeadline",
                              "sentAt",
                              "status",
                              "submittedCount",
                              "totalExpected"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 1024
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "batches",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Get a persisted evaluation batch",
        "description": "Fetch a specific evaluations batches.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_batches_batchId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation batch",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batchNumber": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "displayState": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "in_progress",
                            "done",
                            "overdue",
                            "cancelled",
                            "emptyRun"
                          ]
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluatorCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "itemCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "progressPercent": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "reviewDeadline": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sentAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50
                        },
                        "submittedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalExpected": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "batchNumber",
                        "completedAt",
                        "displayState",
                        "evaluationId",
                        "evaluatorCount",
                        "id",
                        "itemCount",
                        "progressPercent",
                        "reviewDeadline",
                        "sentAt",
                        "status",
                        "submittedCount",
                        "totalExpected"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/close": {
      "post": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Close an evaluation batch",
        "description": "Create or trigger batches close.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_batches_batchId_close",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation batch closed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "alreadyClosed": {
                          "type": "boolean"
                        },
                        "batchId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "closedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "const": "done"
                        }
                      },
                      "required": [
                        "alreadyClosed",
                        "batchId",
                        "closedAt",
                        "evaluationId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/cube": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "List persisted evaluation batch aggregate cube cells",
        "description": "Fetch a specific batches cube.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_batches_batchId_cube",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation batch aggregate cube",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cells": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "answerCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "completionPercent": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "questionLabel": {
                                "type": "string",
                                "maxLength": 512
                              },
                              "questionLabelTruncated": {
                                "type": "boolean"
                              },
                              "responseCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "answerCount",
                              "completionPercent",
                              "id",
                              "questionLabel",
                              "questionLabelTruncated",
                              "responseCount"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "nextCursor": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 1024
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "cells",
                        "nextCursor"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/deadline": {
      "patch": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Update selected evaluation batch review deadlines",
        "description": "The target deadline defines a review duration from its dispatch time. Other selected open, dispatched batches in the same recurring evaluation receive that duration from their own dispatch times. Closed, undispatched or unrelated additional IDs are omitted. At most 1,000 distinct batches including the target may be selected. One-time evaluation IDs are accepted as synthetic batch IDs; only that evaluation and its backing batch are updated. The receipt contains actual updated IDs; use batch reads for resulting deadlines.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_evaluations_evaluationId_batches_batchId_deadline",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Selected batch deadlines updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "updatedBatchIds": {
                          "maxItems": 1000,
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PublicUuid"
                          }
                        }
                      },
                      "required": [
                        "updatedBatchIds"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation review window is closed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batchIds": {
                    "default": [],
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  },
                  "reviewDeadline": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "reviewDeadline"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/reminders": {
      "post": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Queue a targeted reminder for frozen member reviewers in an owned batch",
        "description": "OAuth creator only. Select 1-100 distinct frozen evaluator IDs in an active evaluation and real open batch; guest and AI identities are rejected. Channels are in_app, email and slack; private evaluations cannot select Slack. Manual reminders preserve the app's ability to nudge an overdue open batch. A stable idempotency key recovers the same reminder identity and eight-day publication marker; new keys create new reminders. Recipient authorization is rechecked on every retry. Success means notification queue publication, not provider acceptance or delivery; member preferences, integrations and async delivery policies still apply. Unknown publication/marker outcomes return 503 and may republish on retry with the same event identity; this is not an exactly-once delivery guarantee.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_batches_batchId_reminders",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Targeted member reminder published to the notification queue",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batchId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reminderId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "queued": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "publication": {
                          "type": "string",
                          "const": "queued"
                        }
                      },
                      "required": [
                        "batchId",
                        "evaluationId",
                        "reminderId",
                        "queued",
                        "publication"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation or batch closed, or recipient identity conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "in_app",
                        "email",
                        "slack"
                      ]
                    }
                  },
                  "evaluatorIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "channels",
                  "evaluatorIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/report": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Get a persisted evaluation batch report",
        "description": "Fetch a specific batches report.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_batches_batchId_report",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Persisted evaluation batch report",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "generatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "markdown": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "markdownTruncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "generatedAt",
                        "markdown",
                        "markdownTruncated"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/report/export": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "batches",
          "export"
        ],
        "summary": "Export a complete persisted evaluation batch report",
        "description": "Fetch a specific report export.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_batches_batchId_report_export",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Complete persisted evaluation batch report export",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batchId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "export": {
                          "type": "object",
                          "properties": {
                            "format": {
                              "type": "string",
                              "const": "neatlogs.evaluation.batch-report.v1"
                            },
                            "generatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "format",
                            "generatedAt"
                          ],
                          "additionalProperties": false
                        },
                        "markdown": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "batchId",
                        "evaluationId",
                        "export",
                        "markdown"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation batch report is not available",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluation batch report export exceeds the public response budget",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/report/generate": {
      "post": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Generate or regenerate an asynchronous evaluation report",
        "description": "Creator or project-admin access. Requires a closed, overdue or cancelled batch with submitted responses. Uses frozen batch form and roster context. Retry with the same idempotency key to recover the same admission; use a new key to regenerate after terminal completion. A competing active job returns conflict. The receipt is an admission snapshot; poll report/status for current state and read report for saved Markdown. One-time synthetic evaluation IDs are supported.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_batches_batchId_report_generate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Asynchronous report job admitted or recovered",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "job": {
                          "type": "object",
                          "properties": {
                            "jobId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "completed",
                                "failed"
                              ]
                            }
                          },
                          "required": [
                            "jobId",
                            "status"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "job"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Batch is not eligible or another report job is active",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/report/status": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Get the latest evaluation report job status",
        "description": "Creator or project-admin access. Returns null when no asynchronous report job exists, independently of any older saved Markdown report. Exposes bounded status and safe error codes, never queued payloads or raw provider errors. One-time synthetic evaluation IDs are supported.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_batches_batchId_report_status",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Latest evaluation report job status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "job": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "jobId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "queued",
                                    "running",
                                    "completed",
                                    "failed"
                                  ]
                                },
                                "errorCode": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "pattern": "^[a-z][a-z0-9_]{0,63}$"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                "updatedAt": {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                }
                              },
                              "required": [
                                "jobId",
                                "status",
                                "errorCode",
                                "createdAt",
                                "updatedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "job"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/{batchId}/summary": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Get a persisted evaluation batch summary",
        "description": "Fetch a specific batches summary.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_batches_batchId_summary",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation batch summary",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batchNumber": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "displayState": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "in_progress",
                            "done",
                            "overdue",
                            "cancelled",
                            "emptyRun"
                          ]
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluatorCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "itemCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "progressPercent": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "reviewDeadline": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sentAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50
                        },
                        "submittedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalExpected": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rosterSnapshotComplete": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "batchNumber",
                        "completedAt",
                        "displayState",
                        "evaluationId",
                        "evaluatorCount",
                        "id",
                        "itemCount",
                        "progressPercent",
                        "reviewDeadline",
                        "sentAt",
                        "status",
                        "submittedCount",
                        "totalExpected",
                        "rosterSnapshotComplete"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation batch not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "batchId path parameter"
          },
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/batches/dispatch": {
      "post": {
        "tags": [
          "public",
          "evaluations",
          "batches"
        ],
        "summary": "Dispatch a bounded evaluation batch",
        "description": "sendGuestInvitations=true queues one encrypted retryable invitation per frozen guest reviewer in this batch, within the dispatch transaction. Requires the OAuth creator; private/superuser-owned evaluations cannot invite guests. guestInvitationCount counts queued records, not provider delivery. Read guest-invitations for provider acceptance. Existing activation-level opt-in also applies to automatic future dispatches.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_batches_dispatch",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Evaluation batch dispatched",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "batch": {
                          "type": "object",
                          "properties": {
                            "batchNumber": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "displayState": {
                              "type": "string",
                              "enum": [
                                "pending",
                                "in_progress",
                                "done",
                                "overdue",
                                "cancelled",
                                "emptyRun"
                              ]
                            },
                            "evaluationId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "evaluatorCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "itemCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "progressPercent": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "reviewDeadline": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sentAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "status": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 50
                            },
                            "submittedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "totalExpected": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "batchNumber",
                            "completedAt",
                            "displayState",
                            "evaluationId",
                            "evaluatorCount",
                            "id",
                            "itemCount",
                            "progressPercent",
                            "reviewDeadline",
                            "sentAt",
                            "status",
                            "submittedCount",
                            "totalExpected"
                          ],
                          "additionalProperties": false
                        },
                        "guestInvitationCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "batch"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation dispatch conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sendGuestInvitations": {
                    "type": "boolean"
                  },
                  "maxAssignments": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "maxItems": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  }
                },
                "required": [
                  "maxAssignments",
                  "maxItems"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/close": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Close an owned evaluation",
        "description": "Create or trigger evaluations close.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_close",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation closed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "const": "completed"
                        }
                      },
                      "required": [
                        "id",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/cohort/items/batch-add": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Add exact items to an owned evaluation cohort",
        "description": "Create or trigger items batch-add.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_cohort_items_batch_add",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation cohort items added",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "add",
                            "remove"
                          ]
                        },
                        "changedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "normalizedInputHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "previousSelectionRevision": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rejectedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "requestedCount": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000
                        },
                        "resultingItemCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "selectionRevision": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "action",
                        "changedCount",
                        "normalizedInputHash",
                        "previousSelectionRevision",
                        "rejectedCount",
                        "requestedCount",
                        "resultingItemCount",
                        "selectionRevision"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation cohort state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluation cohort request cannot be processed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "previewHash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "references": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "itemId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "kind": {
                              "type": "string",
                              "const": "evaluation_item"
                            }
                          },
                          "required": [
                            "itemId",
                            "kind"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "trace"
                            },
                            "traceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "kind",
                            "traceId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "span"
                            },
                            "spanId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "traceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "kind",
                            "spanId",
                            "traceId"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "previewHash",
                  "references"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/cohort/items/batch-remove": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Remove exact items from an owned evaluation cohort",
        "description": "Create or trigger items batch-remove.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_cohort_items_batch_remove",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation cohort items removed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "add",
                            "remove"
                          ]
                        },
                        "changedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "normalizedInputHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "previousSelectionRevision": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rejectedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "requestedCount": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000
                        },
                        "resultingItemCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "selectionRevision": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "action",
                        "changedCount",
                        "normalizedInputHash",
                        "previousSelectionRevision",
                        "rejectedCount",
                        "requestedCount",
                        "resultingItemCount",
                        "selectionRevision"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation cohort state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluation cohort request cannot be processed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "previewHash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "references": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "itemId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "kind": {
                              "type": "string",
                              "const": "evaluation_item"
                            }
                          },
                          "required": [
                            "itemId",
                            "kind"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "trace"
                            },
                            "traceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "kind",
                            "traceId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "span"
                            },
                            "spanId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "traceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "kind",
                            "spanId",
                            "traceId"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "previewHash",
                  "references"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/cohort/preview": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Preview an owned evaluation cohort mutation",
        "description": "Create or trigger cohort preview.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_cohort_preview",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation cohort preview",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "acceptedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "add",
                            "remove"
                          ]
                        },
                        "normalizedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "normalizedInputHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "rejectedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "rejections": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "already_present",
                                  "duplicate_reference",
                                  "invalid_target",
                                  "not_present"
                                ]
                              },
                              "referenceIndex": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 999
                              }
                            },
                            "required": [
                              "code",
                              "referenceIndex"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "requestedCount": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000
                        },
                        "selectionRevision": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "truncatedRejectedCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        }
                      },
                      "required": [
                        "acceptedCount",
                        "action",
                        "normalizedCount",
                        "normalizedInputHash",
                        "rejectedCount",
                        "rejections",
                        "requestedCount",
                        "selectionRevision",
                        "truncatedRejectedCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation cohort state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluation cohort request cannot be processed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "add",
                      "remove"
                    ]
                  },
                  "references": {
                    "minItems": 1,
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "itemId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "kind": {
                              "type": "string",
                              "const": "evaluation_item"
                            }
                          },
                          "required": [
                            "itemId",
                            "kind"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "trace"
                            },
                            "traceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "kind",
                            "traceId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "span"
                            },
                            "spanId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "traceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "kind",
                            "spanId",
                            "traceId"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "action",
                  "references"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/draft": {
      "delete": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Discard an owned evaluation draft",
        "description": "Permanently removes a never-launched draft and at most 10,000 draft dependents. Active, completed, archived, or history-bearing evaluations are preserved. Reuse the same Idempotency-Key to replay a successful discard; an absent draft with a new key returns 404.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_evaluations_evaluationId_draft",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Owned evaluation draft discarded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "discarded": {
                          "type": "boolean",
                          "const": true
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "discarded",
                        "evaluationId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation draft not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation cannot be discarded as a bounded draft",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/export": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "export"
        ],
        "summary": "Export bounded evaluation response metadata",
        "description": "Fetch a specific evaluations export.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_export",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded evaluation response metadata export",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluation": {
                          "type": "object",
                          "properties": {
                            "createdAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "isRecurring": {
                              "type": "boolean"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "draft",
                                "active",
                                "completed",
                                "archived"
                              ]
                            },
                            "traceSource": {
                              "type": "string",
                              "enum": [
                                "existing",
                                "future"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 20
                            },
                            "updatedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "createdAt",
                            "id",
                            "isRecurring",
                            "name",
                            "status",
                            "traceSource",
                            "type",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        },
                        "export": {
                          "type": "object",
                          "properties": {
                            "format": {
                              "type": "string",
                              "const": "neatlogs.evaluation.responses.v1"
                            },
                            "from": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 5000
                            },
                            "rowCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 5000
                            },
                            "to": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "truncated": {
                              "type": "boolean"
                            },
                            "truncationReason": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "enum": [
                                    "byte_limit",
                                    "row_limit"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "format",
                            "from",
                            "limit",
                            "rowCount",
                            "to",
                            "truncated",
                            "truncationReason"
                          ],
                          "additionalProperties": false
                        },
                        "responses": {
                          "maxItems": 5000,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "batchId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evaluationItemId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "itemType": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "submittedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "batchId",
                              "evaluationItemId",
                              "id",
                              "itemType",
                              "submittedAt"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "evaluation",
                        "export",
                        "responses"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "description": "from query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 5000,
              "type": "integer",
              "minimum": 1,
              "maximum": 5000
            },
            "description": "limit query parameter"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "description": "to query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/exports": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Create an owned durable full-answer CSV or JSON export",
        "description": "OAuth creator only, selected-project evaluation manage access and current entitlement. Jobs remain scoped to organization/project/evaluation/requesting user. Requires the existing durable export lane and worker configuration; disabled lanes fail with 503. Full submitted answers and reviewer/item context are rendered as CSV or JSON by the existing snapshot worker; caller filters and sensitive trace payload selectors are not accepted. Snapshot source changes fail the job rather than mixing data. One active job per organization, bounded rows/bytes, worker lease/retry/cancellation rules and retention apply. Current status reads resume an existing handle without admitting a new job. Terminal cancellation/failure requires a new creation key to start another job; no force-restart operation. Current creator authorization is rechecked on every read and mutation replay. Stable key recovers the same job through uncertain commit acknowledgments. Response records durable queue admission, not completion or storage delivery.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_exports",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Creator-owned durable evaluation export; inspect status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "job": {
                          "type": "object",
                          "properties": {
                            "attemptCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "maxLength": 128
                                    },
                                    "message": {
                                      "type": "string",
                                      "maxLength": 2048
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "expiresAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "format": {
                              "type": "string",
                              "enum": [
                                "csv",
                                "json"
                              ]
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "processedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "responseCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "cancel_requested",
                                "completed",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            }
                          },
                          "required": [
                            "attemptCount",
                            "completedAt",
                            "createdAt",
                            "error",
                            "expiresAt",
                            "format",
                            "id",
                            "processedCount",
                            "responseCount",
                            "status",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "job"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Owned evaluation or export not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation export conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "410": {
            "description": "Evaluation export expired",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "properties": {
                        "status": {
                          "const": 410,
                          "type": "number"
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "enum": [
                      "csv",
                      "json"
                    ]
                  }
                },
                "required": [
                  "format"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/exports/{jobId}": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get or resume an owned durable evaluation export",
        "description": "OAuth creator only, selected-project evaluation manage access and current entitlement. Jobs remain scoped to organization/project/evaluation/requesting user. Requires the existing durable export lane and worker configuration; disabled lanes fail with 503. Full submitted answers and reviewer/item context are rendered as CSV or JSON by the existing snapshot worker; caller filters and sensitive trace payload selectors are not accepted. Snapshot source changes fail the job rather than mixing data. One active job per organization, bounded rows/bytes, worker lease/retry/cancellation rules and retention apply. Current status reads resume an existing handle without admitting a new job. Terminal cancellation/failure requires a new creation key to start another job; no force-restart operation. Current creator authorization is rechecked on every read and mutation replay.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_exports_jobId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Creator-owned durable evaluation export; inspect status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "job": {
                          "type": "object",
                          "properties": {
                            "attemptCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "maxLength": 128
                                    },
                                    "message": {
                                      "type": "string",
                                      "maxLength": 2048
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "expiresAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "format": {
                              "type": "string",
                              "enum": [
                                "csv",
                                "json"
                              ]
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "processedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "responseCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "cancel_requested",
                                "completed",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            }
                          },
                          "required": [
                            "attemptCount",
                            "completedAt",
                            "createdAt",
                            "error",
                            "expiresAt",
                            "format",
                            "id",
                            "processedCount",
                            "responseCount",
                            "status",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "job"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Owned evaluation or export not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation export conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "410": {
            "description": "Evaluation export expired",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "properties": {
                        "status": {
                          "const": 410,
                          "type": "number"
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/exports/{jobId}/cancel": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Request cancellation of an owned durable evaluation export",
        "description": "OAuth creator only, selected-project evaluation manage access and current entitlement. Jobs remain scoped to organization/project/evaluation/requesting user. Requires the existing durable export lane and worker configuration; disabled lanes fail with 503. Full submitted answers and reviewer/item context are rendered as CSV or JSON by the existing snapshot worker; caller filters and sensitive trace payload selectors are not accepted. Snapshot source changes fail the job rather than mixing data. One active job per organization, bounded rows/bytes, worker lease/retry/cancellation rules and retention apply. Current status reads resume an existing handle without admitting a new job. Terminal cancellation/failure requires a new creation key to start another job; no force-restart operation. Current creator authorization is rechecked on every read and mutation replay. Queued jobs cancel immediately; running jobs return cancel_requested until fenced worker cleanup settles. Completed jobs remain completed.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_exports_jobId_cancel",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Creator-owned durable evaluation export; inspect status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "job": {
                          "type": "object",
                          "properties": {
                            "attemptCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "completedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "error": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "code": {
                                      "type": "string",
                                      "maxLength": 128
                                    },
                                    "message": {
                                      "type": "string",
                                      "maxLength": 2048
                                    }
                                  },
                                  "required": [
                                    "code",
                                    "message"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "expiresAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "format": {
                              "type": "string",
                              "enum": [
                                "csv",
                                "json"
                              ]
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "processedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "responseCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "queued",
                                "running",
                                "cancel_requested",
                                "completed",
                                "failed",
                                "cancelled"
                              ]
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            }
                          },
                          "required": [
                            "attemptCount",
                            "completedAt",
                            "createdAt",
                            "error",
                            "expiresAt",
                            "format",
                            "id",
                            "processedCount",
                            "responseCount",
                            "status",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "job"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Owned evaluation or export not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation export conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "410": {
            "description": "Evaluation export expired",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "properties": {
                        "status": {
                          "const": 410,
                          "type": "number"
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/exports/{jobId}/download": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get an owned completed evaluation export download URL",
        "description": "OAuth creator only, selected-project evaluation manage access and current entitlement. Jobs remain scoped to organization/project/evaluation/requesting user. Requires the existing durable export lane and worker configuration; disabled lanes fail with 503. Full submitted answers and reviewer/item context are rendered as CSV or JSON by the existing snapshot worker; caller filters and sensitive trace payload selectors are not accepted. Snapshot source changes fail the job rather than mixing data. One active job per organization, bounded rows/bytes, worker lease/retry/cancellation rules and retention apply. Current status reads resume an existing handle without admitting a new job. Terminal cancellation/failure requires a new creation key to start another job; no force-restart operation. Current creator authorization is rechecked on every read and mutation replay. Requires completed, unexpired output in the configured private bucket at the expected scoped object key. Returns a new short-lived signed URL without storing it in replay state; signed access can remain valid until URL expiry after later permission changes. Caller-controlled storage locations are rejected. The API response is a URL receipt, not downloaded artifact bytes.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_exports_jobId_download",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Short-lived signed HTTPS attachment URL",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "expiresIn": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 3600
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 8192,
                          "format": "uri"
                        }
                      },
                      "required": [
                        "expiresIn",
                        "url"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Owned evaluation or export not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation export conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "410": {
            "description": "Evaluation export expired",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "properties": {
                        "status": {
                          "const": 410,
                          "type": "number"
                        }
                      },
                      "required": [
                        "status"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/form": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get an evaluation form",
        "description": "Fetch a specific evaluations form.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_form",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation form",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "questions": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "answerType": {
                                "type": "string",
                                "enum": [
                                  "short_answer",
                                  "paragraph",
                                  "multiple_choice",
                                  "checkboxes",
                                  "dropdown",
                                  "file_upload",
                                  "linear_scale",
                                  "rating",
                                  "multiple_choice_grid",
                                  "checkbox_grid"
                                ]
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "options": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "maxLength": 64
                                    },
                                    "additionalProperties": {
                                      "anyOf": [
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "maxLength": 512
                                        },
                                        {
                                          "maxItems": 100,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "maxLength": 512
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "maxLength": 512
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "passRule": {
                                "$ref": "#/components/schemas/PublicEvaluationPassRule"
                              },
                              "placeholder": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2048
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "questionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "questionText": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 16384
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10000
                              }
                            },
                            "required": [
                              "answerType",
                              "isRequired",
                              "options",
                              "placeholder",
                              "questionId",
                              "questionText",
                              "sortOrder"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "evaluationId",
                        "id",
                        "name",
                        "questions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation form not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "put": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Replace an owned draft or active recurring human evaluation form",
        "description": "Active recurring changes apply only to future batches. Dispatched batches retain their immutable form and reviewer snapshots. Explicit question routing must reference the active roster; AI verdict fields cannot be replaced.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "put_api_v1_public_evaluations_evaluationId_form",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation form replaced",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "questions": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "answerType": {
                                "type": "string",
                                "enum": [
                                  "short_answer",
                                  "paragraph",
                                  "multiple_choice",
                                  "checkboxes",
                                  "dropdown",
                                  "file_upload",
                                  "linear_scale",
                                  "rating",
                                  "multiple_choice_grid",
                                  "checkbox_grid"
                                ]
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "options": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "maxLength": 64
                                    },
                                    "additionalProperties": {
                                      "anyOf": [
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "maxLength": 512
                                        },
                                        {
                                          "maxItems": 100,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "maxLength": 512
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "maxLength": 512
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "passRule": {
                                "$ref": "#/components/schemas/PublicEvaluationPassRule"
                              },
                              "placeholder": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2048
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "questionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "questionText": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 16384
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10000
                              }
                            },
                            "required": [
                              "answerType",
                              "isRequired",
                              "options",
                              "placeholder",
                              "questionId",
                              "questionText",
                              "sortOrder"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "evaluationId",
                        "id",
                        "name",
                        "questions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation form conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  },
                  "questions": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "answerType": {
                          "type": "string",
                          "enum": [
                            "short_answer",
                            "paragraph",
                            "multiple_choice",
                            "checkboxes",
                            "dropdown",
                            "file_upload",
                            "linear_scale",
                            "rating",
                            "multiple_choice_grid",
                            "checkbox_grid"
                          ]
                        },
                        "assignedEvaluators": {
                          "anyOf": [
                            {
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 320
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isRequired": {
                          "default": true,
                          "type": "boolean"
                        },
                        "options": {
                          "anyOf": [
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "maxLength": 64
                              },
                              "additionalProperties": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "string",
                                    "maxLength": 512
                                  },
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "maxLength": 512
                                    }
                                  }
                                ]
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "passRule": {
                          "$ref": "#/components/schemas/PublicEvaluationPassRule"
                        },
                        "placeholder": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2048
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "questionText": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 16384
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        }
                      },
                      "required": [
                        "answerType",
                        "questionText",
                        "sortOrder"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "name",
                  "questions"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/form/generate": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Generate a form preview for an owned evaluation",
        "description": "Create or trigger form generate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_form_generate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Generated form preview; not persisted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "questions": {
                          "minItems": 1,
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "question_text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 16384
                              },
                              "answer_type": {
                                "type": "string",
                                "enum": [
                                  "short_answer",
                                  "paragraph",
                                  "multiple_choice",
                                  "checkboxes",
                                  "dropdown",
                                  "file_upload",
                                  "linear_scale",
                                  "rating",
                                  "multiple_choice_grid",
                                  "checkbox_grid"
                                ]
                              },
                              "placeholder": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 4096
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "is_required": {
                                "type": "boolean"
                              },
                              "sort_order": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 19
                              },
                              "options": {
                                "anyOf": [
                                  {},
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "question_text",
                              "answer_type",
                              "is_required",
                              "sort_order"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "questions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Generated form is outside the supported contract",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 16384
                  },
                  "questionCount": {
                    "default": 5,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  }
                },
                "required": [
                  "prompt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/form/management": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get an owned evaluation form with reviewer routing",
        "description": "Fetch a specific form management.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_form_management",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Owned evaluation form with reviewer routing",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "questions": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "answerType": {
                                "type": "string",
                                "enum": [
                                  "short_answer",
                                  "paragraph",
                                  "multiple_choice",
                                  "checkboxes",
                                  "dropdown",
                                  "file_upload",
                                  "linear_scale",
                                  "rating",
                                  "multiple_choice_grid",
                                  "checkbox_grid"
                                ]
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "options": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "maxLength": 64
                                    },
                                    "additionalProperties": {
                                      "anyOf": [
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "string",
                                          "maxLength": 512
                                        },
                                        {
                                          "maxItems": 100,
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "maxLength": 512
                                          }
                                        }
                                      ]
                                    }
                                  },
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "maxLength": 512
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "passRule": {
                                "$ref": "#/components/schemas/PublicEvaluationPassRule"
                              },
                              "placeholder": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2048
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "questionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "questionText": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 16384
                              },
                              "sortOrder": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10000
                              },
                              "assignedEvaluators": {
                                "anyOf": [
                                  {
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 320
                                    }
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "answerType",
                              "isRequired",
                              "options",
                              "placeholder",
                              "questionId",
                              "questionText",
                              "sortOrder",
                              "assignedEvaluators"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "formVersionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "evaluationId",
                        "id",
                        "name",
                        "questions",
                        "formVersionId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation form not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/guest-invitations": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Read guest invitation delivery status",
        "description": "OAuth evaluation creator with current project read access. Invitations requested by sendGuestInvitations are durably queued with lifecycle mutation and retried by the evaluation worker. accepted means the email provider acknowledged acceptance, not inbox delivery. failed means acceptance was not confirmed after five attempts. Redacted stable IDs, state and timing only; no recipient email, token, encrypted retry material or link URL. A provider timeout or process crash can cause at-least-once delivery of the same review link. Actor/project/campaign-bound ascending ID cursors.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_guest_invitations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Invitation status page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "invitations": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "batchId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evaluatorId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "guestLinkId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "accepted",
                                  "failed",
                                  "cancelled"
                                ]
                              },
                              "attempts": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 5
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "acceptedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "batchId",
                              "evaluatorId",
                              "guestLinkId",
                              "status",
                              "attempts",
                              "createdAt",
                              "acceptedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "hasMore": {
                              "type": "boolean"
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "limit",
                            "hasMore",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "invitations",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            },
            "description": "cursor query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/items": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List evaluation items",
        "description": "Fetch a specific evaluations items.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_items",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded evaluation item page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "addedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "batchId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "elementIndex": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "elementKey": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2048
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "elementPath": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2048
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "elementSide": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "input",
                                      "output"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "itemId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "itemType": {
                                "type": "string",
                                "enum": [
                                  "trace",
                                  "span",
                                  "dataset_case"
                                ]
                              },
                              "subjectKind": {
                                "type": "string",
                                "enum": [
                                  "live",
                                  "dataset_case"
                                ]
                              },
                              "datasetCaseRevisionId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "parentTraceId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "spanId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "queued",
                                  "dispatched",
                                  "superseded"
                                ]
                              },
                              "traceId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "addedAt",
                              "batchId",
                              "elementIndex",
                              "elementKey",
                              "elementPath",
                              "elementSide",
                              "id",
                              "itemId",
                              "itemType",
                              "parentTraceId",
                              "spanId",
                              "status",
                              "traceId"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "items",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/items/{itemId}": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get an evaluation item",
        "description": "Fetch a specific evaluations items.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_items_itemId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation item metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "addedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "batchId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "elementIndex": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "elementKey": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2048
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "elementPath": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2048
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "elementSide": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "input",
                                "output"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "itemId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "itemType": {
                          "type": "string",
                          "enum": [
                            "trace",
                            "span",
                            "dataset_case"
                          ]
                        },
                        "subjectKind": {
                          "type": "string",
                          "enum": [
                            "live",
                            "dataset_case"
                          ]
                        },
                        "datasetCaseRevisionId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parentTraceId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "spanId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "dispatched",
                            "superseded"
                          ]
                        },
                        "traceId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "addedAt",
                        "batchId",
                        "elementIndex",
                        "elementKey",
                        "elementPath",
                        "elementSide",
                        "id",
                        "itemId",
                        "itemType",
                        "parentTraceId",
                        "spanId",
                        "status",
                        "traceId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation item not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "itemId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/items/{itemId}/review": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get assigned evaluation review context",
        "description": "Fetch a specific items review.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_items_itemId_review",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Assignment-aware evaluation review context",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "assignmentId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "existingResponse": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "answers": {
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "answerValue": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "maxLength": 65536
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "questionId": {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      }
                                    },
                                    "required": [
                                      "answerValue",
                                      "questionId"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "responseId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "submittedAt": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "answers",
                                "responseId",
                                "submittedAt"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "form": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "questions": {
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "answerType": {
                                    "type": "string",
                                    "enum": [
                                      "short_answer",
                                      "paragraph",
                                      "multiple_choice",
                                      "checkboxes",
                                      "dropdown",
                                      "file_upload",
                                      "linear_scale",
                                      "rating",
                                      "multiple_choice_grid",
                                      "checkbox_grid"
                                    ]
                                  },
                                  "isRequired": {
                                    "type": "boolean"
                                  },
                                  "options": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "propertyNames": {
                                          "type": "string",
                                          "maxLength": 64
                                        },
                                        "additionalProperties": {
                                          "anyOf": [
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "string",
                                              "maxLength": 512
                                            },
                                            {
                                              "maxItems": 100,
                                              "type": "array",
                                              "items": {
                                                "type": "string",
                                                "maxLength": 512
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      {
                                        "maxItems": 100,
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "maxLength": 512
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "passRule": {
                                    "$ref": "#/components/schemas/PublicEvaluationPassRule"
                                  },
                                  "placeholder": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 2048
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "questionId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "questionText": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 16384
                                  },
                                  "sortOrder": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 10000
                                  }
                                },
                                "required": [
                                  "answerType",
                                  "isRequired",
                                  "options",
                                  "placeholder",
                                  "questionId",
                                  "questionText",
                                  "sortOrder"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "questions"
                          ],
                          "additionalProperties": false
                        },
                        "itemId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "unanswered",
                            "draft",
                            "submitted"
                          ]
                        }
                      },
                      "required": [
                        "assignmentId",
                        "evaluationId",
                        "existingResponse",
                        "form",
                        "itemId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation review not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "itemId path parameter"
          },
          {
            "name": "assignmentId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "assignmentId query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/items/{itemId}/review/draft": {
      "put": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Save an assigned evaluation review draft",
        "description": "Replace/update review draft.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "put_api_v1_public_evaluations_evaluationId_items_itemId_review_draft",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation review draft saved",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "assignmentId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "itemId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "responseId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "savedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "submitted"
                          ]
                        }
                      },
                      "required": [
                        "assignmentId",
                        "evaluationId",
                        "itemId",
                        "responseId",
                        "savedAt",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation review not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation review conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "itemId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "answers": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "answerValue": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 65536
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "questionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "answerValue",
                        "questionId"
                      ],
                      "additionalProperties": false
                    },
                    "uniqueItems": true
                  },
                  "assignmentId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "answers"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/items/{itemId}/review/submissions": {
      "patch": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Edit an assigned submitted evaluation review",
        "description": "Partially update review submissions.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_evaluations_evaluationId_items_itemId_review_submissions",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Submitted evaluation review updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "assignmentId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "itemId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "responseId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "const": "submitted"
                        },
                        "submittedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "assignmentId",
                        "evaluationId",
                        "itemId",
                        "responseId",
                        "state",
                        "submittedAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation review not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation review conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "itemId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "answers": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "answerValue": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 65536
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "questionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "answerValue",
                        "questionId"
                      ],
                      "additionalProperties": false
                    },
                    "uniqueItems": true
                  },
                  "assignmentId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "answers"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Submit an assigned evaluation review",
        "description": "Create or trigger review submissions.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_items_itemId_review_submissions",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation review submitted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "assignmentId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "itemId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "remainingItems": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "responseId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "const": "submitted"
                        },
                        "submittedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "assignmentId",
                        "evaluationId",
                        "itemId",
                        "remainingItems",
                        "responseId",
                        "state",
                        "submittedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation review not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation review conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "itemId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "answers": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "answerValue": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 65536
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "questionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "answerValue",
                        "questionId"
                      ],
                      "additionalProperties": false
                    },
                    "uniqueItems": true
                  },
                  "assignmentId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "answers"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/launch": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Launch an owned evaluation and assign it to yourself",
        "description": "Create or trigger evaluations launch.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_launch",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation launched and assigned to the current user",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "alreadyLaunched": {
                          "type": "boolean"
                        },
                        "assignedItemCount": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 1000000
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluatorId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reviewDeadline": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "reviewDuration": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(?:[1-9]|[1-9]\\d{1,2}|[1-7]\\d{3}|8[0-6]\\d{2}|87[0-5]\\d|8760)h$"
                            },
                            {
                              "type": "string",
                              "pattern": "^(?:[1-9]|[1-9]\\d|[12]\\d{2}|3[0-5]\\d|36[0-5])d$"
                            },
                            {
                              "type": "string",
                              "pattern": "^(?:[1-9]|[1-4]\\d|5[0-2])w$"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "const": "active"
                        }
                      },
                      "required": [
                        "alreadyLaunched",
                        "assignedItemCount",
                        "evaluationId",
                        "evaluatorId",
                        "reviewDeadline",
                        "reviewDuration",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation launch conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assignMe": {
                    "type": "boolean",
                    "const": true
                  },
                  "reviewDuration": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-9]\\d{1,2}|[1-7]\\d{3}|8[0-6]\\d{2}|87[0-5]\\d|8760)h$"
                      },
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-9]\\d|[12]\\d{2}|3[0-5]\\d|36[0-5])d$"
                      },
                      {
                        "type": "string",
                        "pattern": "^(?:[1-9]|[1-4]\\d|5[0-2])w$"
                      }
                    ]
                  }
                },
                "required": [
                  "assignMe",
                  "reviewDuration"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/progress": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get evaluation progress",
        "description": "Fetch a specific evaluations progress.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_progress",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation progress",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "drafts": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pending": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "progress": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "submitted": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalEvaluators": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalExpected": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalItems": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "drafts",
                        "pending",
                        "progress",
                        "submitted",
                        "totalEvaluators",
                        "totalExpected",
                        "totalItems"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/responses": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List submitted evaluation responses",
        "description": "Fetch a specific evaluations responses.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_responses",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded submitted evaluation response page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "responses": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "answers": {
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "answerType": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 30
                                    },
                                    "questionId": {
                                      "$ref": "#/components/schemas/PublicUuid"
                                    },
                                    "truncated": {
                                      "type": "boolean"
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 256
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "answerType",
                                    "questionId",
                                    "truncated",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "evaluationId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "itemId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "submittedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "answers",
                              "evaluationId",
                              "id",
                              "itemId",
                              "submittedAt"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "responses"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/responses/{responseId}": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Get a full submitted evaluation response",
        "description": "OAuth creator or assigned reviewer with current selected-project evaluation read access and app evaluation visibility. Returns full answer values, current app reviewer display identity, item identifiers and each referenced immutable form/question version. Draft, missing and foreign responses are unavailable. No trace content or guest tokens. At most 100 answers and 4 MiB minus envelope allowance; oversized answers/context fail with 413 and can use durable export. The existing bounded response list remains unchanged.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_responses_responseId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Full submitted response detail",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluatorId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "submittedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "item": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "type": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 30
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "externalId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "traceId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "spanId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 64
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "parentTraceId": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "batchId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "externalId",
                            "traceId",
                            "spanId",
                            "parentTraceId",
                            "batchId"
                          ],
                          "additionalProperties": false
                        },
                        "reviewer": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 320
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "name": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "isAi": {
                              "type": "boolean"
                            },
                            "definitionId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "email",
                            "name",
                            "isAi",
                            "definitionId"
                          ],
                          "additionalProperties": false
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "questionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 4190208
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "question": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 16384
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "answerType": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 30
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "formId": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "formVersionId": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "specKey": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 160
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "text",
                                  "answerType",
                                  "formId",
                                  "formVersionId",
                                  "specKey"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "questionId",
                              "value",
                              "question"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "evaluationId",
                        "evaluatorId",
                        "submittedAt",
                        "createdAt",
                        "updatedAt",
                        "item",
                        "reviewer",
                        "answers"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Submitted response exceeds detail limits; use durable export",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "responseId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/responses/{responseId}/questions/{questionId}/insight": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Read the persisted explanation for a submitted AI judgement answer",
        "description": "OAuth user with current selected-project evaluation read access and app evaluation visibility. Resolve response and question IDs from responses. Matches the succeeded AI run for the exact evaluation, item and evaluator definition. Returns the app's per-field explanation with a 20,000-character prefix and explicit truncation flag. Missing, human, draft and cross-project answers return 404. No raw provider errors, tool arguments or trace payloads are exposed.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_responses_responseId_questions_questionId_insight",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Persisted answer explanation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "entryId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reasoning": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20000
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "entryId",
                        "reasoning",
                        "truncated"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "responseId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "responseId path parameter"
          },
          {
            "name": "questionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "questionId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/reviewers": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "List the current roster of an owned evaluation",
        "description": "Fetch a specific evaluations reviewers.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_reviewers",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Current evaluation reviewer roster",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reviewers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "member",
                                  "guest",
                                  "ai"
                                ]
                              },
                              "email": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 320
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evaluatorDefinitionId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 30
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "assignedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "completedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "kind",
                              "email",
                              "userId",
                              "evaluatorDefinitionId",
                              "status",
                              "assignedAt",
                              "completedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "evaluationId",
                        "reviewers",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/reviewers/{reviewerId}": {
      "delete": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Remove a reviewer from an owned draft or active recurring evaluation",
        "description": "Removes a draft assignment or marks it removed from the future roster of an active recurring evaluation. Dispatched batch snapshots remain unchanged. Reuse the same Idempotency-Key to replay a successful removal.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_evaluations_evaluationId_reviewers_reviewerId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation reviewer removed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reviewerId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "removed": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "evaluationId",
                        "reviewerId",
                        "removed"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation or reviewer not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation roster cannot be changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "reviewerId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "reviewerId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/reviewers/ai": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Attach AI evaluators to an owned draft or active recurring evaluation",
        "description": "Attaches or reassigns up to 100 active project evaluator definitions. Draft changes affect activation; recurring changes affect future batches without changing dispatched snapshots. Code evaluators require the existing runtime capability and Auto Review without human reviewers or human-authored form questions. Remove assignments with the existing reviewer removal operation.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_reviewers_ai",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "AI evaluator definitions assigned",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reviewers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reviewerId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "evaluatorDefinitionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              }
                            },
                            "required": [
                              "reviewerId",
                              "evaluatorDefinitionId"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "evaluationId",
                        "reviewers"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation or reviewer not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation roster cannot be changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "evaluatorDefinitionIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  }
                },
                "required": [
                  "evaluatorDefinitionIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/reviewers/guests": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Assign guests to an owned draft or active recurring evaluation",
        "description": "Adds or reassigns up to 100 normalized guest email identities without sending invitations or granting workspace membership. Existing member/AI identity collisions are rejected. Draft changes affect activation; active recurring changes affect future batches only.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_reviewers_guests",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation guest reviewers assigned",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reviewers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reviewerId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "email": {
                                "type": "string",
                                "maxLength": 254,
                                "format": "email",
                                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                              }
                            },
                            "required": [
                              "reviewerId",
                              "email"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "evaluationId",
                        "reviewers"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation or reviewer not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation roster cannot be changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 254,
                      "format": "email",
                      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                    }
                  }
                },
                "required": [
                  "emails"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/reviewers/members": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Assign members to an owned draft or active recurring evaluation",
        "description": "Adds or reassigns up to 100 existing eligible workspace members. Draft changes affect activation; active recurring changes affect future batches. Existing dispatched snapshots are preserved. External email invitations use separate guest operations.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_evaluationId_reviewers_members",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluation members assigned",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reviewers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reviewerId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "userId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              }
                            },
                            "required": [
                              "reviewerId",
                              "userId"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "evaluationId",
                        "reviewers"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation or reviewer not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluation roster cannot be changed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reviewerUserIds": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  }
                },
                "required": [
                  "reviewerUserIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/runs/{runId}/diagnostics": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Read safe persisted campaign run diagnostics",
        "description": "OAuth selected-project evaluation reader with current app evaluation visibility. Exact evaluation/project/run ownership before persisted lifecycle, timing, cost and tool-call counts. Failed runs expose only a generic error code. Raw debug trace, prompts, tool arguments/results and provider errors are omitted; traceContentIncluded is false. This is a persisted diagnostic receipt, not a replay of native debug steps.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_runs_runId_diagnostics",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Safe campaign run diagnostics",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "definitionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "succeeded",
                            "failed"
                          ]
                        },
                        "toolCalls": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "durationMs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "costUsd": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "const": "EVALUATOR_RUN_FAILED"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "traceContentIncluded": {
                          "type": "boolean",
                          "const": false
                        }
                      },
                      "required": [
                        "id",
                        "evaluationId",
                        "definitionId",
                        "status",
                        "toolCalls",
                        "durationMs",
                        "costUsd",
                        "createdAt",
                        "completedAt",
                        "errorCode",
                        "traceContentIncluded"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/{evaluationId}/runs/{runId}/trace": {
      "get": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Read bounded redacted evaluator replay steps",
        "description": "OAuth evaluation reader with current App visibility. Verify campaign/project/run ownership before reading the native diagnostic artifact. Paginated assistant, tool call/result and verdict steps, bounded content and argument previews, credential-key redaction, generic failed-step errors and explicit truncation. System/user prompt steps are omitted and counted. Native source cap 2 MiB, 20-second timeout. Debug artifact retention and best-effort persistence can make traces unavailable even for a completed run.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user and explicit x-project-id; current project RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluations_evaluationId_runs_runId_trace",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted replay step page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "steps": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "assistant",
                                  "tool_call",
                                  "tool_result",
                                  "verdict"
                                ]
                              },
                              "content": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 4000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "argumentsPreview": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "toolName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 160
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "ok": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "latencyMs": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "truncated": {
                                "type": "boolean"
                              },
                              "redacted": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "index",
                              "role",
                              "content",
                              "argumentsPreview",
                              "toolName",
                              "ok",
                              "latencyMs",
                              "truncated",
                              "redacted"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "offset": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextOffset": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "totalSteps": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "omittedSteps": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "offset",
                            "limit",
                            "nextOffset",
                            "totalSteps",
                            "omittedSteps"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "evaluationId",
                        "steps",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Native trace is unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluationId path parameter"
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "description": "offset query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluations/generate-metadata": {
      "post": {
        "tags": [
          "public",
          "evaluations"
        ],
        "summary": "Generate an evaluation name and description",
        "description": "Create or trigger evaluations generate-metadata.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluations_generate_metadata",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Generated evaluation name and description; not persisted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 16384
                        }
                      },
                      "required": [
                        "name",
                        "description"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Generated metadata is outside the supported contract",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "saved_dataset": {
                    "type": "object",
                    "properties": {
                      "dataset_id": {
                        "$ref": "#/components/schemas/PublicUuid"
                      },
                      "version_id": {
                        "$ref": "#/components/schemas/PublicUuid"
                      }
                    },
                    "required": [
                      "dataset_id",
                      "version_id"
                    ],
                    "additionalProperties": false
                  },
                  "trace_mode": {
                    "type": "string",
                    "enum": [
                      "existing",
                      "future"
                    ]
                  },
                  "runs_on": {
                    "default": {
                      "scope": "all"
                    },
                    "type": "object",
                    "properties": {
                      "scope": {
                        "default": "all",
                        "type": "string",
                        "enum": [
                          "all",
                          "types",
                          "names"
                        ]
                      },
                      "types": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "names": {
                        "anyOf": [
                          {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  },
                  "selected_items": {
                    "anyOf": [
                      {
                        "maxItems": 1000,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "item_type": {
                              "type": "string",
                              "enum": [
                                "trace",
                                "span"
                              ]
                            },
                            "item_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "parent_trace_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "item_type",
                            "item_id"
                          ],
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "selection": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "const": "allMatching"
                          },
                          "target": {
                            "type": "string",
                            "enum": [
                              "spans",
                              "traces"
                            ]
                          },
                          "filter": {
                            "anyOf": [
                              {},
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "filter_hash": {
                            "type": "string"
                          },
                          "from": {
                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                          },
                          "to": {
                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                          },
                          "span_type": {
                            "type": "string"
                          },
                          "span_name": {
                            "type": "string"
                          },
                          "excludedItemIds": {
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "excluded_item_ids": {
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "runs_on": {},
                          "review_count": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 1000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "total_count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000
                          },
                          "trace_count": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "trace_ids": {
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "traceIds": {
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "search_query": {
                            "type": "string",
                            "maxLength": 4096
                          },
                          "q": {
                            "type": "string",
                            "maxLength": 4096
                          },
                          "sort": {
                            "type": "string",
                            "enum": [
                              "startedAt:asc",
                              "startedAt:desc",
                              "random"
                            ]
                          },
                          "sort_seed": {
                            "type": "string",
                            "maxLength": 255
                          },
                          "random_seed": {
                            "type": "string",
                            "maxLength": 255
                          }
                        },
                        "required": [
                          "mode",
                          "target"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "selection_summary": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "const": "allMatching"
                          },
                          "target": {
                            "type": "string",
                            "enum": [
                              "spans",
                              "traces"
                            ]
                          },
                          "total_items": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "span_count": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "trace_count": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "runs_on": {}
                        },
                        "required": [
                          "mode",
                          "target",
                          "total_items"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "future_traces": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "filters": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "operator": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "field",
                                    "operator",
                                    "value"
                                  ]
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "starts_at": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ends_at": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "batch_schedule": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "sampling_rate": {
                            "default": 100,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                          },
                          "daily_limit": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "send_frequency": {
                            "default": "immediate",
                            "type": "string",
                            "enum": [
                              "immediate",
                              "batched",
                              "manual"
                            ]
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "questions": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 16384
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "short_answer",
                            "paragraph",
                            "multiple_choice",
                            "checkboxes",
                            "dropdown",
                            "linear_scale",
                            "rating",
                            "multiple_choice_grid",
                            "checkbox_grid"
                          ]
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "required": {
                          "default": true,
                          "type": "boolean"
                        },
                        "config": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "max_length": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "max_length": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "min_length": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              }
                            },
                            {
                              "type": "object",
                              "properties": {
                                "options": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "has_other": {
                                  "default": false,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "options"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "options": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "has_other": {
                                  "default": false,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "options"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "options": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              },
                              "required": [
                                "options"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "min": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "const": 0
                                    },
                                    {
                                      "type": "number",
                                      "const": 1
                                    }
                                  ]
                                },
                                "max": {
                                  "type": "integer",
                                  "minimum": 2,
                                  "maximum": 10
                                },
                                "min_label": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "max_label": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "min",
                                "max"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "symbol": {
                                  "type": "string",
                                  "enum": [
                                    "star",
                                    "heart",
                                    "thumbs"
                                  ]
                                },
                                "max": {
                                  "type": "integer",
                                  "minimum": 3,
                                  "maximum": 10
                                }
                              },
                              "required": [
                                "symbol",
                                "max"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "rows": {
                                  "minItems": 1,
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "columns": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "limit_one_per_column": {
                                  "default": false,
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "rows",
                                "columns"
                              ]
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "text",
                        "type",
                        "config"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "ai_evaluators": {
                    "default": [],
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  "evaluator_count": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "duration": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "trace_mode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluators": {
      "get": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "List evaluator definitions",
        "description": "List or read public evaluators.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluators",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator definitions",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluators": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "isArchived": {
                                "type": "boolean"
                              },
                              "maxBudgetUsd": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 100
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "maxToolCalls": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 50
                              },
                              "modelName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 120
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "modelProvider": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 40
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "outputFieldCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 50
                              },
                              "reasoningEnabled": {
                                "type": "boolean"
                              },
                              "toolGrantCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 50
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "llm_judge",
                                  "agent_judge",
                                  "code"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              }
                            },
                            "required": [
                              "createdAt",
                              "description",
                              "id",
                              "isArchived",
                              "maxBudgetUsd",
                              "maxToolCalls",
                              "modelName",
                              "modelProvider",
                              "name",
                              "outputFieldCount",
                              "reasoningEnabled",
                              "toolGrantCount",
                              "type",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "evaluators",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              ]
            },
            "description": "includeArchived query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "llm_judge",
                "agent_judge",
                "code"
              ]
            },
            "description": "type query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Create a judge or code evaluator definition",
        "description": "Code definitions require the runtime capability, Python or JavaScript source compilation, and declared score types. Preview/playground and durable runs use the isolated code runtime when enabled.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluators",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Evaluator created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "maxBudgetUsd": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "maxToolCalls": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 50
                        },
                        "modelName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 120
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "modelProvider": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "reasoningEnabled": {
                          "type": "boolean"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "llm_judge",
                            "agent_judge",
                            "code"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "codeLanguage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "python",
                                "javascript"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "codeSource": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 16000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "outputSpec": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80,
                                "pattern": "^[a-zA-Z0-9_]+$"
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "answerType": {
                                "type": "string",
                                "maxLength": 40
                              },
                              "scoreType": {
                                "type": "string",
                                "enum": [
                                  "boolean",
                                  "numeric",
                                  "categorical",
                                  "text"
                                ]
                              },
                              "options": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 200
                                }
                              },
                              "required": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "key",
                              "label"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "systemPrompt": {
                          "type": "string",
                          "maxLength": 20000
                        },
                        "toolGrants": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "configured": {
                                "type": "boolean"
                              },
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "neatlogs_mcp",
                                  "composio",
                                  "http_get",
                                  "custom_mcp"
                                ]
                              },
                              "toolName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 160
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "configured",
                              "provider",
                              "toolName"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "id",
                        "isArchived",
                        "maxBudgetUsd",
                        "maxToolCalls",
                        "modelName",
                        "modelProvider",
                        "name",
                        "reasoningEnabled",
                        "type",
                        "updatedAt",
                        "outputSpec",
                        "systemPrompt",
                        "toolGrants"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluator conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "codeLanguage": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "python",
                              "javascript"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "codeSource": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 16000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "maxBudgetUsd": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "maxToolCalls": {
                        "default": 12,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50
                      },
                      "modelName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "modelProvider": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "\\S"
                      },
                      "outputSpec": {
                        "default": [],
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80,
                              "pattern": "^[a-zA-Z0-9_]+$"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "answerType": {
                              "type": "string",
                              "maxLength": 40
                            },
                            "scoreType": {
                              "type": "string",
                              "enum": [
                                "boolean",
                                "numeric",
                                "categorical",
                                "text"
                              ]
                            },
                            "options": {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 200
                              }
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "key",
                            "label"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "decisionModelEnabled": {
                        "type": "boolean"
                      },
                      "reasoningEnabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "systemPrompt": {
                        "type": "string",
                        "maxLength": 20000,
                        "pattern": "\\S"
                      },
                      "toolGrants": {
                        "default": [],
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "config": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "additionalProperties": {}
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "neatlogs_mcp",
                                "composio",
                                "http_get",
                                "custom_mcp"
                              ]
                            },
                            "toolName": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 160
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "provider"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "type": {
                        "default": "llm_judge",
                        "type": "string",
                        "enum": [
                          "llm_judge",
                          "agent_judge"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "systemPrompt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "codeLanguage": {
                        "type": "string",
                        "enum": [
                          "python",
                          "javascript"
                        ]
                      },
                      "codeSource": {
                        "type": "string",
                        "maxLength": 16000,
                        "pattern": "\\S"
                      },
                      "description": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "maxBudgetUsd": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "maxToolCalls": {
                        "default": 12,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50
                      },
                      "modelName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "modelProvider": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "pattern": "\\S"
                      },
                      "outputSpec": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80,
                              "pattern": "^[a-zA-Z0-9_]+$"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "answerType": {
                              "type": "string",
                              "maxLength": 40
                            },
                            "scoreType": {
                              "type": "string",
                              "enum": [
                                "boolean",
                                "numeric",
                                "categorical",
                                "text"
                              ]
                            },
                            "options": {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 200
                              }
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "key",
                            "label"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "decisionModelEnabled": {
                        "type": "boolean"
                      },
                      "reasoningEnabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "systemPrompt": {
                        "default": "",
                        "type": "string",
                        "maxLength": 20000
                      },
                      "toolGrants": {
                        "default": [],
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "config": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "additionalProperties": {}
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "neatlogs_mcp",
                                "composio",
                                "http_get",
                                "custom_mcp"
                              ]
                            },
                            "toolName": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 160
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "provider"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "code"
                      }
                    },
                    "required": [
                      "codeLanguage",
                      "codeSource",
                      "name",
                      "outputSpec",
                      "type"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluators/{evaluatorId}": {
      "get": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Get an evaluator definition",
        "description": "Fetch a specific public evaluators.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluators_evaluatorId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator definition",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "maxBudgetUsd": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "maxToolCalls": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 50
                        },
                        "modelName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 120
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "modelProvider": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "reasoningEnabled": {
                          "type": "boolean"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "llm_judge",
                            "agent_judge",
                            "code"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "codeLanguage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "python",
                                "javascript"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "codeSource": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 16000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "outputSpec": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80,
                                "pattern": "^[a-zA-Z0-9_]+$"
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "answerType": {
                                "type": "string",
                                "maxLength": 40
                              },
                              "scoreType": {
                                "type": "string",
                                "enum": [
                                  "boolean",
                                  "numeric",
                                  "categorical",
                                  "text"
                                ]
                              },
                              "options": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 200
                                }
                              },
                              "required": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "key",
                              "label"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "systemPrompt": {
                          "type": "string",
                          "maxLength": 20000
                        },
                        "toolGrants": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "configured": {
                                "type": "boolean"
                              },
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "neatlogs_mcp",
                                  "composio",
                                  "http_get",
                                  "custom_mcp"
                                ]
                              },
                              "toolName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 160
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "configured",
                              "provider",
                              "toolName"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "id",
                        "isArchived",
                        "maxBudgetUsd",
                        "maxToolCalls",
                        "modelName",
                        "modelProvider",
                        "name",
                        "reasoningEnabled",
                        "type",
                        "updatedAt",
                        "outputSpec",
                        "systemPrompt",
                        "toolGrants"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Update an evaluator definition",
        "description": "Code updates validate the effective stored language, source and score fields. Active campaign source/output contracts cannot change.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_evaluators_evaluatorId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "maxBudgetUsd": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "maxToolCalls": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 50
                        },
                        "modelName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 120
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "modelProvider": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "reasoningEnabled": {
                          "type": "boolean"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "llm_judge",
                            "agent_judge",
                            "code"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "codeLanguage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "python",
                                "javascript"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "codeSource": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 16000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "outputSpec": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80,
                                "pattern": "^[a-zA-Z0-9_]+$"
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "answerType": {
                                "type": "string",
                                "maxLength": 40
                              },
                              "scoreType": {
                                "type": "string",
                                "enum": [
                                  "boolean",
                                  "numeric",
                                  "categorical",
                                  "text"
                                ]
                              },
                              "options": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 200
                                }
                              },
                              "required": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "key",
                              "label"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "systemPrompt": {
                          "type": "string",
                          "maxLength": 20000
                        },
                        "toolGrants": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "configured": {
                                "type": "boolean"
                              },
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "neatlogs_mcp",
                                  "composio",
                                  "http_get",
                                  "custom_mcp"
                                ]
                              },
                              "toolName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 160
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "configured",
                              "provider",
                              "toolName"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "id",
                        "isArchived",
                        "maxBudgetUsd",
                        "maxToolCalls",
                        "modelName",
                        "modelProvider",
                        "name",
                        "reasoningEnabled",
                        "type",
                        "updatedAt",
                        "outputSpec",
                        "systemPrompt",
                        "toolGrants"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluator conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Updated evaluator exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "codeLanguage": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "python",
                          "javascript"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "codeSource": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 16000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxBudgetUsd": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxToolCalls": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  },
                  "modelName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "modelProvider": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 40
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  },
                  "outputSpec": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "pattern": "^[a-zA-Z0-9_]+$"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "answerType": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "scoreType": {
                          "type": "string",
                          "enum": [
                            "boolean",
                            "numeric",
                            "categorical",
                            "text"
                          ]
                        },
                        "options": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 200
                          }
                        },
                        "required": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "key",
                        "label"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "decisionModelEnabled": {
                    "type": "boolean"
                  },
                  "reasoningEnabled": {
                    "type": "boolean"
                  },
                  "systemPrompt": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "toolGrants": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "config": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "additionalProperties": {}
                        },
                        "provider": {
                          "type": "string",
                          "enum": [
                            "neatlogs_mcp",
                            "composio",
                            "http_get",
                            "custom_mcp"
                          ]
                        },
                        "toolName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "provider"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "llm_judge",
                      "agent_judge",
                      "code"
                    ]
                  },
                  "isArchived": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluators/{evaluatorId}/duplicate": {
      "post": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Duplicate an evaluator definition",
        "description": "Create or trigger evaluators duplicate.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluators_evaluatorId_duplicate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Evaluator duplicated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "maxBudgetUsd": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "maxToolCalls": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 50
                        },
                        "modelName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 120
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "modelProvider": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 40
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "reasoningEnabled": {
                          "type": "boolean"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "llm_judge",
                            "agent_judge",
                            "code"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "codeLanguage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "python",
                                "javascript"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "codeSource": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 16000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "outputSpec": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80,
                                "pattern": "^[a-zA-Z0-9_]+$"
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "answerType": {
                                "type": "string",
                                "maxLength": 40
                              },
                              "scoreType": {
                                "type": "string",
                                "enum": [
                                  "boolean",
                                  "numeric",
                                  "categorical",
                                  "text"
                                ]
                              },
                              "options": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 200
                                }
                              },
                              "required": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "key",
                              "label"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "systemPrompt": {
                          "type": "string",
                          "maxLength": 20000
                        },
                        "toolGrants": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "configured": {
                                "type": "boolean"
                              },
                              "provider": {
                                "type": "string",
                                "enum": [
                                  "neatlogs_mcp",
                                  "composio",
                                  "http_get",
                                  "custom_mcp"
                                ]
                              },
                              "toolName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 160
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "configured",
                              "provider",
                              "toolName"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "id",
                        "isArchived",
                        "maxBudgetUsd",
                        "maxToolCalls",
                        "modelName",
                        "modelProvider",
                        "name",
                        "reasoningEnabled",
                        "type",
                        "updatedAt",
                        "outputSpec",
                        "systemPrompt",
                        "toolGrants"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluator conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored evaluator exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluators/{evaluatorId}/playground": {
      "post": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Run a bounded stored evaluator playground",
        "description": "Preserves App model, reasoning, configured tool-call budget (1-50) and spend cap (0-100 or null). Agent provider bundles normalize to named built-in tools, HTTP GET with exact hosts, and use_integration fenced to the selected connected Composio toolkits/custom MCP servers. Code uses the capability-gated isolated runner. Admission quota reserves the configured USD cap with a USD 1 minimum; null caps reserve USD 100 admission units. Daily compute allowance is USD 100 admission units, not measured provider spend. A null cap remains null in the native request. Sixty-second cancellation timeout, bounded redacted verdict, and optional includeExplanations apply.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluators_evaluatorId_playground",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator playground verdict",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "reasoning": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reasoningTruncated": {
                          "type": "boolean"
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "fields": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reasoning": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evidenceRefs": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 128
                                }
                              },
                              "offList": {
                                "type": "boolean"
                              },
                              "explanationTruncated": {
                                "type": "boolean"
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "score": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "key",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "overall": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "overallScore": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "failed",
                            "succeeded",
                            "unknown"
                          ]
                        },
                        "toolCalls": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        }
                      },
                      "required": [
                        "error",
                        "fields",
                        "overall",
                        "overallScore",
                        "status",
                        "toolCalls"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator input not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator execution is unavailable or too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "includeExplanations": {
                    "type": "boolean"
                  },
                  "attachmentIds": {
                    "default": [],
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  },
                  "inputText": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "outputText": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "spanId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "traceId": {
                    "default": "",
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluators/{evaluatorId}/runs": {
      "get": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "List evaluator run history",
        "description": "Campaign history is the compatible default. Use kind=standalone or kind=all with OAuth to discover durable public runs, including cancelled and cancelling states. Cursors are bound to the selected kind and project.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluators_evaluatorId_runs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator runs",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "runs": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "completedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "durationMs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evaluationId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "itemId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "running",
                                  "cancelling",
                                  "succeeded",
                                  "failed",
                                  "cancelled"
                                ]
                              },
                              "verdict": {
                                "type": "object",
                                "properties": {
                                  "overallScore": {
                                    "anyOf": [
                                      {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "status": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "failed",
                                          "succeeded",
                                          "unknown"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "overallScore",
                                  "status"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "completedAt",
                              "createdAt",
                              "durationMs",
                              "evaluationId",
                              "id",
                              "itemId",
                              "status",
                              "verdict"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "runs"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator run page exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "default": "campaign",
              "type": "string",
              "enum": [
                "campaign",
                "standalone",
                "all"
              ]
            },
            "description": "kind query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Start a durable evaluator run",
        "description": "Pins the admitted App definition, model, reasoning, tool grants, 1-50 calls and configured 0-100/null spend cap. Durable admission quota reserves at least USD 5, or the configured cap; null caps reserve USD 100 admission units. Daily quota is USD 500 admission units, not actual provider spend. Existing queued runs without a snapshot retain their previous USD 5/8-call policy. Cancellation and the 120-second runtime ceiling remain enforced.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluators_evaluatorId_runs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Evaluator run accepted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "reasoning": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reasoningTruncated": {
                          "type": "boolean"
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "durationMs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evaluatorId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "fields": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reasoning": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evidenceRefs": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 128
                                }
                              },
                              "offList": {
                                "type": "boolean"
                              },
                              "explanationTruncated": {
                                "type": "boolean"
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "score": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "key",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "overall": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "overallScore": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "spanId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "startedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "cancelling",
                            "succeeded",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "toolCalls": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "completedAt",
                        "createdAt",
                        "durationMs",
                        "errorCode",
                        "evaluatorId",
                        "fields",
                        "id",
                        "overall",
                        "overallScore",
                        "spanId",
                        "startedAt",
                        "status",
                        "toolCalls",
                        "traceId",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluator run conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator is not safe for public execution",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "spanId": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "traceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  }
                },
                "required": [
                  "traceId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluators/{evaluatorId}/runs/{runId}": {
      "get": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Get a durable evaluator run",
        "description": "includeExplanations=true includes bounded verdict reasoning, evidence references and off-list flags. Truncation is explicit. Raw steps, tool arguments and provider errors remain excluded.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluators_evaluatorId_runs_runId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator run",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "reasoning": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reasoningTruncated": {
                          "type": "boolean"
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "durationMs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evaluatorId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "fields": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reasoning": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evidenceRefs": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 128
                                }
                              },
                              "offList": {
                                "type": "boolean"
                              },
                              "explanationTruncated": {
                                "type": "boolean"
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "score": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "key",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "overall": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "overallScore": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "spanId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "startedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "cancelling",
                            "succeeded",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "toolCalls": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "completedAt",
                        "createdAt",
                        "durationMs",
                        "errorCode",
                        "evaluatorId",
                        "fields",
                        "id",
                        "overall",
                        "overallScore",
                        "spanId",
                        "startedAt",
                        "status",
                        "toolCalls",
                        "traceId",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator run response is too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "includeExplanations",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              ]
            },
            "description": "includeExplanations query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluators/{evaluatorId}/runs/{runId}/cancel": {
      "post": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Cancel a durable evaluator run",
        "description": "Create or trigger runs cancel.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluators_evaluatorId_runs_runId_cancel",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator run cancellation requested",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "reasoning": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reasoningTruncated": {
                          "type": "boolean"
                        },
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "durationMs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evaluatorId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "fields": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reasoning": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evidenceRefs": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 128
                                }
                              },
                              "offList": {
                                "type": "boolean"
                              },
                              "explanationTruncated": {
                                "type": "boolean"
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "score": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "key",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "overall": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "overallScore": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "spanId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 64
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "startedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "cancelling",
                            "succeeded",
                            "failed",
                            "cancelled"
                          ]
                        },
                        "toolCalls": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "completedAt",
                        "createdAt",
                        "durationMs",
                        "errorCode",
                        "evaluatorId",
                        "fields",
                        "id",
                        "overall",
                        "overallScore",
                        "spanId",
                        "startedAt",
                        "status",
                        "toolCalls",
                        "traceId",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Evaluator run conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator run response is too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluators/{evaluatorId}/skills": {
      "get": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "List skills attached to an evaluator",
        "description": "Fetch a specific evaluators skills.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_evaluators_evaluatorId_skills",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator skills",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "skills": {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "body": {
                                "type": "string",
                                "maxLength": 100000
                              },
                              "description": {
                                "type": "string",
                                "maxLength": 1024
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "skillId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "suggestedQuestions": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "text": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1000
                                    },
                                    "answerType": {
                                      "type": "string",
                                      "maxLength": 40
                                    },
                                    "options": {
                                      "maxItems": 50,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "maxLength": 200
                                      }
                                    }
                                  },
                                  "required": [
                                    "text"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "version": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 9007199254740991
                              },
                              "versionCreatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "whenToUse": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1024
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "body",
                              "description",
                              "name",
                              "position",
                              "skillId",
                              "suggestedQuestions",
                              "version",
                              "versionCreatedAt",
                              "whenToUse"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "skills"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator skill list exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "put": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Replace an evaluator's ordered skill version pins",
        "description": "Atomically replaces at most ten skill grants. Empty skills removes all pins. Versions must belong to evaluator skills in the selected project. Duplicate versions keep their first occurrence; positions determine stable ordering and are stored densely from zero. Existing archived skill versions remain eligible, as in the app.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "put_api_v1_public_evaluators_evaluatorId_skills",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator skill pins replaced",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluatorId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "skills": {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "skillVersionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "position": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9
                              }
                            },
                            "required": [
                              "skillVersionId",
                              "position"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "evaluatorId",
                        "skills"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "evaluatorId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "evaluatorId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "skills": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "skillVersionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "skillVersionId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "skills"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/evaluators/code/validate": {
      "post": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Validate code evaluator source",
        "description": "Validates Python or JavaScript source with the existing capability-gated compiler. Returns bounded diagnostics, source hash and runtime limits; does not execute the evaluator or persist a definition. OAuth eval management permission required. Fifteen-second timeout and request cancellation apply.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluators_code_validate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Code validation diagnostics and limits",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "diagnostics": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "maxLength": 100
                              },
                              "column": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "detail": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 4000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "line": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "message": {
                                "type": "string",
                                "maxLength": 4000
                              },
                              "phase": {
                                "type": "string",
                                "maxLength": 100
                              },
                              "severity": {
                                "type": "string",
                                "maxLength": 40
                              }
                            },
                            "required": [
                              "code",
                              "column",
                              "detail",
                              "line",
                              "message",
                              "phase",
                              "severity"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "executable": {
                          "type": "boolean"
                        },
                        "input_schema": {
                          "type": "string",
                          "const": "eval.v1"
                        },
                        "language": {
                          "type": "string",
                          "enum": [
                            "python",
                            "javascript"
                          ]
                        },
                        "limits": {
                          "type": "object",
                          "properties": {
                            "compile_timeout_ms": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "execution_timeout_ms": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "hard_timeout_ms": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "max_input_bytes": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "max_output_chars": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "max_result_chars": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "max_source_chars": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "memory_limit_mb": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "compile_timeout_ms",
                            "execution_timeout_ms",
                            "hard_timeout_ms",
                            "max_input_bytes",
                            "max_output_chars",
                            "max_result_chars",
                            "max_source_chars",
                            "memory_limit_mb"
                          ],
                          "additionalProperties": false
                        },
                        "source_hash": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "status": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "succeeded",
                                "compile_error",
                                "timeout",
                                "runtime_error",
                                "invalid_result"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "valid": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "diagnostics",
                        "executable",
                        "input_schema",
                        "language",
                        "limits",
                        "source_hash",
                        "status",
                        "valid"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator input not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator execution is unavailable or too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "language": {
                    "type": "string",
                    "enum": [
                      "python",
                      "javascript"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 16000
                  }
                },
                "required": [
                  "language",
                  "source"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/evaluators/preview": {
      "post": {
        "tags": [
          "public",
          "evaluators"
        ],
        "summary": "Preview a bounded evaluator draft",
        "description": "Preserves App model, reasoning, configured tool-call budget (1-50) and spend cap (0-100 or null). Agent provider bundles normalize to named built-in tools, HTTP GET with exact hosts, and use_integration fenced to the selected connected Composio toolkits/custom MCP servers. Code uses the capability-gated isolated runner. Admission quota reserves the configured USD cap with a USD 1 minimum; null caps reserve USD 100 admission units. Daily compute allowance is USD 100 admission units, not measured provider spend. A null cap remains null in the native request. Sixty-second cancellation timeout, bounded redacted verdict, and optional includeExplanations apply.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_evaluators_preview",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator preview verdict",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "reasoning": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 4000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reasoningTruncated": {
                          "type": "boolean"
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "fields": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reasoning": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evidenceRefs": {
                                "maxItems": 5,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 128
                                }
                              },
                              "offList": {
                                "type": "boolean"
                              },
                              "explanationTruncated": {
                                "type": "boolean"
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "score": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {}
                            },
                            "required": [
                              "key",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "overall": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 20000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "overallScore": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "failed",
                            "succeeded",
                            "unknown"
                          ]
                        },
                        "toolCalls": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 50
                        }
                      },
                      "required": [
                        "error",
                        "fields",
                        "overall",
                        "overallScore",
                        "status",
                        "toolCalls"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Evaluator input not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Evaluator execution is unavailable or too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "evaluation:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "includeExplanations": {
                    "type": "boolean"
                  },
                  "definition": {
                    "type": "object",
                    "properties": {
                      "codeLanguage": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "python",
                              "javascript"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "codeSource": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 16000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "maxBudgetUsd": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "maxToolCalls": {
                        "default": 12,
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50
                      },
                      "modelName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "modelProvider": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 40
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "outputSpec": {
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80,
                              "pattern": "^[a-zA-Z0-9_]+$"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "answerType": {
                              "type": "string",
                              "maxLength": 40
                            },
                            "scoreType": {
                              "type": "string",
                              "enum": [
                                "boolean",
                                "numeric",
                                "categorical",
                                "text"
                              ]
                            },
                            "options": {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 200
                              }
                            },
                            "required": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "key",
                            "label"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "decisionModelEnabled": {
                        "default": false,
                        "type": "boolean"
                      },
                      "reasoningEnabled": {
                        "default": true,
                        "type": "boolean"
                      },
                      "systemPrompt": {
                        "default": "",
                        "type": "string",
                        "maxLength": 20000
                      },
                      "toolGrants": {
                        "default": [],
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "config": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "additionalProperties": {}
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "neatlogs_mcp",
                                "composio",
                                "http_get",
                                "custom_mcp"
                              ]
                            },
                            "toolName": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 160
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "provider"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "type": {
                        "default": "llm_judge",
                        "type": "string",
                        "enum": [
                          "llm_judge",
                          "agent_judge",
                          "code"
                        ]
                      }
                    },
                    "required": [
                      "outputSpec"
                    ],
                    "additionalProperties": false
                  },
                  "item": {
                    "type": "object",
                    "properties": {
                      "includeExplanations": {
                        "type": "boolean"
                      },
                      "attachmentIds": {
                        "default": [],
                        "maxItems": 5,
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "inputText": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "outputText": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "spanId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "traceId": {
                        "default": "",
                        "type": "string",
                        "maxLength": 255
                      }
                    },
                    "additionalProperties": false
                  },
                  "skillVersionIds": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUuid"
                    }
                  }
                },
                "required": [
                  "definition",
                  "item"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/execution-identity": {
      "get": {
        "tags": [
          "public",
          "context"
        ],
        "summary": "Read stable authenticated execution identity",
        "description": "List or read public execution-identity.\n\n**Auth:** Requires a current OAuth user or service-account Bearer token to bind recovery custody. This identity response grants no operation or project access.",
        "operationId": "get_api_v1_public_execution_identity",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Stable authenticated execution identity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "issuer": {
                          "type": "string",
                          "format": "uri"
                        },
                        "actor": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "service_account"
                              ]
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "issuer",
                        "actor"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": []
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/feedback/bulk": {
      "post": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "Mutate feedback in a bounded bulk request",
        "description": "Create or trigger feedback bulk.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_feedback_bulk",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Feedback bulk mutation completed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "failed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "requested": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "results": {
                          "minItems": 1,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "action": {
                                        "type": "string",
                                        "enum": [
                                          "trace_feedback.create",
                                          "trace_feedback.update",
                                          "trace_feedback.delete"
                                        ]
                                      },
                                      "itemKey": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64,
                                        "pattern": "^[A-Za-z0-9._:-]+$"
                                      },
                                      "outcome": {
                                        "type": "string",
                                        "const": "succeeded"
                                      },
                                      "resourceId": {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      "resourceType": {
                                        "type": "string",
                                        "const": "trace_feedback"
                                      }
                                    },
                                    "required": [
                                      "action",
                                      "itemKey",
                                      "outcome",
                                      "resourceId",
                                      "resourceType"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "action": {
                                        "type": "string",
                                        "enum": [
                                          "span_feedback.set",
                                          "span_feedback.delete"
                                        ]
                                      },
                                      "itemKey": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64,
                                        "pattern": "^[A-Za-z0-9._:-]+$"
                                      },
                                      "outcome": {
                                        "type": "string",
                                        "const": "succeeded"
                                      },
                                      "resourceId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "resourceType": {
                                        "type": "string",
                                        "const": "span_feedback"
                                      }
                                    },
                                    "required": [
                                      "action",
                                      "itemKey",
                                      "outcome",
                                      "resourceId",
                                      "resourceType"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "trace_feedback.create",
                                      "trace_feedback.update",
                                      "trace_feedback.delete",
                                      "span_feedback.set",
                                      "span_feedback.delete"
                                    ]
                                  },
                                  "code": {
                                    "type": "string",
                                    "enum": [
                                      "TARGET_UNAVAILABLE",
                                      "TARGET_NOT_READY",
                                      "CONFLICT"
                                    ]
                                  },
                                  "itemKey": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64,
                                    "pattern": "^[A-Za-z0-9._:-]+$"
                                  },
                                  "outcome": {
                                    "type": "string",
                                    "const": "failed"
                                  }
                                },
                                "required": [
                                  "action",
                                  "code",
                                  "itemKey",
                                  "outcome"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "succeeded": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "failed",
                        "requested",
                        "results",
                        "succeeded"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "trace_feedback.create"
                            },
                            "body": {
                              "type": "object",
                              "properties": {
                                "accuracy": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 50
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "comment": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "description": "At most 16384 UTF-8 bytes."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "expectedResponse": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "description": "At most 32768 UTF-8 bytes."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "issueTypes": {
                                  "maxItems": 20,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  }
                                },
                                "rating": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -100,
                                      "maximum": 100
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false,
                              "minProperties": 1
                            },
                            "itemKey": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[A-Za-z0-9._:-]+$"
                            },
                            "target": {
                              "type": "object",
                              "properties": {
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "traceId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "body",
                            "itemKey",
                            "target"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "trace_feedback.update"
                            },
                            "body": {
                              "type": "object",
                              "properties": {
                                "accuracy": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 50
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "comment": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "description": "At most 16384 UTF-8 bytes."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "expectedResponse": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "description": "At most 32768 UTF-8 bytes."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "issueTypes": {
                                  "maxItems": 20,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                  }
                                },
                                "rating": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -100,
                                      "maximum": 100
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "additionalProperties": false,
                              "minProperties": 1
                            },
                            "itemKey": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[A-Za-z0-9._:-]+$"
                            },
                            "target": {
                              "type": "object",
                              "properties": {
                                "feedbackId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "feedbackId",
                                "traceId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "body",
                            "itemKey",
                            "target"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "trace_feedback.delete"
                            },
                            "body": {
                              "type": "object",
                              "properties": {
                                "confirmation": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                }
                              },
                              "required": [
                                "confirmation"
                              ],
                              "additionalProperties": false
                            },
                            "itemKey": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[A-Za-z0-9._:-]+$"
                            },
                            "target": {
                              "type": "object",
                              "properties": {
                                "feedbackId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "feedbackId",
                                "traceId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "body",
                            "itemKey",
                            "target"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "span_feedback.set"
                            },
                            "body": {
                              "type": "object",
                              "properties": {
                                "note": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "description": "At most 2048 UTF-8 bytes."
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "vote": {
                                  "type": "string",
                                  "enum": [
                                    "up",
                                    "down"
                                  ]
                                }
                              },
                              "required": [
                                "vote"
                              ],
                              "additionalProperties": false
                            },
                            "itemKey": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[A-Za-z0-9._:-]+$"
                            },
                            "target": {
                              "type": "object",
                              "properties": {
                                "spanId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "spanId",
                                "traceId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "body",
                            "itemKey",
                            "target"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "action": {
                              "type": "string",
                              "const": "span_feedback.delete"
                            },
                            "body": {
                              "type": "object",
                              "properties": {
                                "confirmation": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                }
                              },
                              "required": [
                                "confirmation"
                              ],
                              "additionalProperties": false
                            },
                            "itemKey": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[A-Za-z0-9._:-]+$"
                            },
                            "target": {
                              "type": "object",
                              "properties": {
                                "spanId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "spanId",
                                "traceId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "action",
                            "body",
                            "itemKey",
                            "target"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "items"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/guest-links": {
      "get": {
        "tags": [
          "public",
          "sharing"
        ],
        "summary": "List guest-link metadata",
        "description": "List or read public guest-links.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_guest_links",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded redacted guest-link metadata page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "guestLinks": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "expiresAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "lastUsedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "permission": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "resourceId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "resourceType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "expired",
                                  "revoked"
                                ]
                              }
                            },
                            "required": [
                              "createdAt",
                              "expiresAt",
                              "id",
                              "lastUsedAt",
                              "permission",
                              "resourceId",
                              "resourceType",
                              "state"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "guestLinks",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "sharing:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "sharing"
        ],
        "summary": "Mint an evaluation guest link",
        "description": "Create or trigger public guest-links.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_guest_links",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Guest link minted; one-time secret is client wrapped",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_guest_links"
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version",
                            "operationId"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{22}$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Guest link mutation conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "sharing:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "evaluationId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "recipientEmail": {
                    "type": "string",
                    "maxLength": 255,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  }
                },
                "required": [
                  "evaluationId",
                  "recipientEmail"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 43,
              "maxLength": 43,
              "allOf": [
                {
                  "pattern": "^[A-Za-z0-9_-]{43}$"
                },
                {
                  "pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
                }
              ],
              "writeOnly": true,
              "description": "Required 32-byte unpadded base64url secret replay key"
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/guest-links/{guestLinkId}": {
      "delete": {
        "tags": [
          "public",
          "sharing"
        ],
        "summary": "Revoke a guest link",
        "description": "Delete public guest-links.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_guest_links_guestLinkId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Guest link revoked",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "const": "revoked"
                        }
                      },
                      "required": [
                        "id",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "guestLinkId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "guestLinkId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "sharing:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "sharing"
        ],
        "summary": "Get guest-link metadata",
        "description": "Fetch a specific public guest-links.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_guest_links_guestLinkId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted guest-link metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "lastUsedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "permission": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "resourceId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "resourceType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "expired",
                            "revoked"
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "expiresAt",
                        "id",
                        "lastUsedAt",
                        "permission",
                        "resourceId",
                        "resourceType",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Guest link not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "guestLinkId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "guestLinkId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "sharing:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/guest-links/{guestLinkId}/deliver": {
      "post": {
        "tags": [
          "public",
          "sharing"
        ],
        "summary": "Email an existing evaluation guest link",
        "description": "Requires the previously minted plaintext token in the JSON body and evaluation creator ownership. Sends only to the token-bound external recipient after checking the active review window and frozen batch identity. Accepted means provider acceptance, not inbox delivery. Same token version is deduplicated for eight days. Provider acceptance followed by receipt failure may redeliver on retry. No token is returned or retained in the replay result.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_guest_links_guestLinkId_deliver",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Guest invitation accepted by email provider",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "guestLinkId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "const": "accepted"
                        }
                      },
                      "required": [
                        "guestLinkId",
                        "evaluationId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Active guest invitation not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Guest invitation window or recipient conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Guest invitation delivery unavailable; retry the same idempotency key. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "guestLinkId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "guestLinkId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "sharing:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{32}$",
                    "writeOnly": true
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/guest-links/{guestLinkId}/rotate": {
      "post": {
        "tags": [
          "public",
          "sharing"
        ],
        "summary": "Rotate a guest link",
        "description": "Create or trigger guest-links rotate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_guest_links_guestLinkId_rotate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Guest link rotated; replacement one-time secret is client wrapped",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_guest_links_guestLinkId_rotate"
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version",
                            "operationId"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{22}$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Guest link rotation conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "guestLinkId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "guestLinkId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 43,
              "maxLength": 43,
              "allOf": [
                {
                  "pattern": "^[A-Za-z0-9_-]{43}$"
                },
                {
                  "pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
                }
              ],
              "writeOnly": true,
              "description": "Required 32-byte unpadded base64url secret replay key"
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "sharing:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/guest-links/bulk/mint": {
      "post": {
        "tags": [
          "public",
          "sharing"
        ],
        "summary": "Mint guest links atomically",
        "description": "Create or trigger bulk mint.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_guest_links_bulk_mint",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Guest links minted; one-time secrets are client wrapped together",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_guest_links_bulk_mint"
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version",
                            "operationId"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{22}$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60000,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Guest-link mint target not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Guest-link bulk mint conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Guest-link bulk mint request cannot be processed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "sharing:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requests": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "recipientEmail": {
                          "type": "string",
                          "maxLength": 255,
                          "format": "email",
                          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                        }
                      },
                      "required": [
                        "evaluationId",
                        "recipientEmail"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "requests"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 43,
              "maxLength": 43,
              "allOf": [
                {
                  "pattern": "^[A-Za-z0-9_-]{43}$"
                },
                {
                  "pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
                }
              ],
              "writeOnly": true,
              "description": "Required 32-byte unpadded base64url secret replay key"
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/guest-links/bulk/revoke": {
      "post": {
        "tags": [
          "public",
          "sharing"
        ],
        "summary": "Revoke guest links atomically",
        "description": "Create or trigger bulk revoke.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_guest_links_bulk_revoke",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Guest links revoked atomically",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "guestLinks": {
                          "minItems": 1,
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "state": {
                                "type": "string",
                                "const": "revoked"
                              }
                            },
                            "required": [
                              "id",
                              "state"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "guestLinks",
                        "schemaVersion"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Guest-link revoke target not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Guest-link bulk revoke conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Guest-link bulk revoke request cannot be processed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "sharing:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requests": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "confirmation": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "guestLinkId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "confirmation",
                        "guestLinkId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "requests"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/guest-links/export": {
      "get": {
        "tags": [
          "public",
          "sharing",
          "export"
        ],
        "summary": "Export guest-link metadata",
        "description": "List or read guest-links export.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_guest_links_export",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded redacted guest-link metadata export",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "guestLinks": {
                          "maxItems": 500,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "expiresAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "lastUsedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "permission": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "resourceId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "resourceType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "expired",
                                  "revoked"
                                ]
                              }
                            },
                            "required": [
                              "createdAt",
                              "expiresAt",
                              "id",
                              "lastUsedAt",
                              "permission",
                              "resourceId",
                              "resourceType",
                              "state"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "guestLinks",
                        "schemaVersion"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Guest-link export exceeds the public response budget",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "sharing:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/guest-review/context": {
      "get": {
        "tags": [
          "public",
          "guest-review"
        ],
        "summary": "Get guest-review context",
        "description": "List or read guest-review context.\n\n**Auth:** Requires Authorization: NeatLogsGuest with a guest token bound to one evaluation or batch review resource.",
        "operationId": "get_api_v1_public_guest_review_context",
        "x-auth-gate": "public-guest-token",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded guest-review context",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "form": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "questions": {
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "answerType": {
                                        "type": "string",
                                        "enum": [
                                          "short_answer",
                                          "paragraph",
                                          "multiple_choice",
                                          "checkboxes",
                                          "dropdown",
                                          "file_upload",
                                          "linear_scale",
                                          "rating",
                                          "multiple_choice_grid",
                                          "checkbox_grid"
                                        ]
                                      },
                                      "isRequired": {
                                        "type": "boolean"
                                      },
                                      "options": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "propertyNames": {
                                              "type": "string",
                                              "maxLength": 64
                                            },
                                            "additionalProperties": {
                                              "anyOf": [
                                                {
                                                  "type": "boolean"
                                                },
                                                {
                                                  "type": "number"
                                                },
                                                {
                                                  "type": "string",
                                                  "maxLength": 512
                                                },
                                                {
                                                  "maxItems": 100,
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string",
                                                    "maxLength": 512
                                                  }
                                                }
                                              ]
                                            }
                                          },
                                          {
                                            "maxItems": 100,
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "maxLength": 512
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "passRule": {
                                        "$ref": "#/components/schemas/PublicEvaluationPassRule"
                                      },
                                      "placeholder": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "maxLength": 2048
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "questionId": {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      "questionText": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 16384
                                      },
                                      "sortOrder": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 10000
                                      }
                                    },
                                    "required": [
                                      "answerType",
                                      "isRequired",
                                      "options",
                                      "placeholder",
                                      "questionId",
                                      "questionText",
                                      "sortOrder"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "questions"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "items": {
                          "maxItems": 25,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "inputPreview": {
                                "type": "string"
                              },
                              "inputTruncated": {
                                "type": "boolean"
                              },
                              "itemType": {
                                "type": "string",
                                "enum": [
                                  "span",
                                  "trace"
                                ]
                              },
                              "outputPreview": {
                                "type": "string"
                              },
                              "outputTruncated": {
                                "type": "boolean"
                              },
                              "submitted": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "inputPreview",
                              "inputTruncated",
                              "itemType",
                              "outputPreview",
                              "outputTruncated",
                              "submitted"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 25
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "resource": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "batch",
                                "evaluation"
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "type"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "evaluationId",
                        "form",
                        "items",
                        "page",
                        "resource"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Guest-review context cannot fit the public response budget",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "GuestTokenAuth": []
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            },
            "description": "limit query parameter"
          }
        ]
      }
    },
    "/api/v1/public/guest-review/items/{itemId}/response": {
      "put": {
        "tags": [
          "public",
          "guest-review"
        ],
        "summary": "Submit a guest-review response",
        "description": "Replace/update items response.\n\n**Auth:** Requires Authorization: NeatLogsGuest with a guest token bound to one evaluation or batch review resource.",
        "operationId": "put_api_v1_public_guest_review_items_itemId_response",
        "x-auth-gate": "public-guest-token",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Guest review response submitted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "evaluationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "itemId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "remainingItems": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "responseId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "const": "submitted"
                        },
                        "submittedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "evaluationId",
                        "itemId",
                        "remainingItems",
                        "responseId",
                        "state",
                        "submittedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Guest review submission conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Guest-review response cannot satisfy the public contract",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "itemId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "GuestTokenAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Full replacement of the guest-visible answer set",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "answers": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "answerValue": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "questionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "answerValue",
                        "questionId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "answers"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/imports/connections": {
      "get": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "List cached import connection metadata",
        "description": "List or read imports connections.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_imports_connections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import connection metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connections": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "cachedProjectCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 10000
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "langfuse",
                                  "braintrust",
                                  "raindrop",
                                  "langsmith",
                                  "phoenix",
                                  "laminar",
                                  "arize_ax"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "unverified",
                                  "verified"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "cachedProjectCount",
                              "createdAt",
                              "id",
                              "label",
                              "source",
                              "status",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "connections",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored import connection page cannot be represented safely",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Create and verify an import connection",
        "description": "Create or trigger imports connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_imports_connections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Import connection created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cachedProjectCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "langfuse",
                            "braintrust",
                            "raindrop",
                            "langsmith",
                            "phoenix",
                            "laminar",
                            "arize_ax"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "unverified",
                            "verified"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "cachedProjectCount",
                        "createdAt",
                        "id",
                        "label",
                        "source",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Import connection conflicts with an existing connection",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Import provider credentials could not be verified",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Import provider is temporarily unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "langfuse"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "baseUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          },
                          "publicKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "secretKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "baseUrl",
                          "publicKey",
                          "secretKey"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "braintrust"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "baseUrl": {
                            "type": "string",
                            "enum": [
                              "https://api.braintrust.dev",
                              "https://api-eu.braintrust.dev"
                            ]
                          }
                        },
                        "required": [
                          "apiKey",
                          "baseUrl"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "langsmith"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "baseUrl": {
                            "type": "string",
                            "enum": [
                              "https://api.smith.langchain.com",
                              "https://eu.api.smith.langchain.com",
                              "https://apac.api.smith.langchain.com",
                              "https://aws.api.smith.langchain.com"
                            ]
                          }
                        },
                        "required": [
                          "apiKey",
                          "baseUrl"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "raindrop"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "phoenix"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "baseUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "apiKey",
                          "baseUrl"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "laminar"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "baseUrl": {
                            "default": "https://api.lmnr.ai",
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials",
                      "name"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/imports/connections/{connectionId}": {
      "delete": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Delete an unused import connection",
        "description": "Delete imports connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_imports_connections_connectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import connection deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "connectionId",
                        "deleted"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import connection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Import jobs still reference this connection",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Get cached import connection metadata",
        "description": "Fetch a specific imports connections.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_imports_connections_connectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import connection metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cachedProjectCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "langfuse",
                            "braintrust",
                            "raindrop",
                            "langsmith",
                            "phoenix",
                            "laminar",
                            "arize_ax"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "unverified",
                            "verified"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "cachedProjectCount",
                        "createdAt",
                        "id",
                        "label",
                        "source",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import connection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored import connection cannot be represented safely",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Update and verify an import connection",
        "description": "Partially update imports connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_imports_connections_connectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import connection updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cachedProjectCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "langfuse",
                            "braintrust",
                            "raindrop",
                            "langsmith",
                            "phoenix",
                            "laminar",
                            "arize_ax"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "unverified",
                            "verified"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "cachedProjectCount",
                        "createdAt",
                        "id",
                        "label",
                        "source",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import connection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Import connection conflicts with an existing connection",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Import provider credentials could not be verified",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Import provider is temporarily unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "langfuse"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "baseUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          },
                          "publicKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "secretKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "baseUrl",
                          "publicKey",
                          "secretKey"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "braintrust"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "baseUrl": {
                            "type": "string",
                            "enum": [
                              "https://api.braintrust.dev",
                              "https://api-eu.braintrust.dev"
                            ]
                          }
                        },
                        "required": [
                          "apiKey",
                          "baseUrl"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "langsmith"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "baseUrl": {
                            "type": "string",
                            "enum": [
                              "https://api.smith.langchain.com",
                              "https://eu.api.smith.langchain.com",
                              "https://apac.api.smith.langchain.com",
                              "https://aws.api.smith.langchain.com"
                            ]
                          }
                        },
                        "required": [
                          "apiKey",
                          "baseUrl"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "raindrop"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "phoenix"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "baseUrl": {
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "apiKey",
                          "baseUrl"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "laminar"
                      },
                      "credentials": {
                        "type": "object",
                        "properties": {
                          "apiKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "writeOnly": true
                          },
                          "baseUrl": {
                            "default": "https://api.lmnr.ai",
                            "type": "string",
                            "maxLength": 2048,
                            "format": "uri"
                          }
                        },
                        "required": [
                          "apiKey"
                        ],
                        "additionalProperties": false
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      }
                    },
                    "required": [
                      "source",
                      "credentials"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/imports/connections/{connectionId}/source-projects": {
      "get": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "List cached source projects for an import connection",
        "description": "Fetch a specific connections source-projects.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_imports_connections_connectionId_source_projects",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Cached import source projects",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cachedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "projects": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "cachedAt",
                        "connectionId",
                        "page",
                        "projects"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import connection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Cached source projects cannot be represented safely",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/imports/connections/{connectionId}/verify": {
      "post": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Verify an import connection",
        "description": "Create or trigger connections verify.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_imports_connections_connectionId_verify",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import connection verified",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "cachedProjectCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "langfuse",
                            "braintrust",
                            "raindrop",
                            "langsmith",
                            "phoenix",
                            "laminar",
                            "arize_ax"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "unverified",
                            "verified"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "cachedProjectCount",
                        "createdAt",
                        "id",
                        "label",
                        "source",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import connection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored import credentials could not be verified",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Import provider is temporarily unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "description": "Retry-After response header",
                "required": false,
                "schema": {
                  "type": "string",
                  "const": "1"
                }
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/imports/jobs": {
      "get": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "List import jobs for the selected project",
        "description": "List or read imports jobs.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_imports_jobs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import job metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "jobs": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "connectionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "failureCategory": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "authentication",
                                      "configuration",
                                      "provider",
                                      "rate_limit",
                                      "unknown"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "failedTraces": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "one_time",
                                  "recurring"
                                ]
                              },
                              "partialFailure": {
                                "type": "boolean",
                                "const": true
                              },
                              "progress": {
                                "type": "object",
                                "properties": {
                                  "processed": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "total": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "processed",
                                  "total"
                                ],
                                "additionalProperties": false
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "langfuse",
                                  "braintrust",
                                  "raindrop",
                                  "langsmith",
                                  "phoenix",
                                  "laminar",
                                  "arize_ax"
                                ]
                              },
                              "sourceProjectId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "cancelled",
                                  "failed",
                                  "paused",
                                  "pending",
                                  "running",
                                  "succeeded",
                                  "unknown"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "connectionId",
                              "createdAt",
                              "failureCategory",
                              "id",
                              "mode",
                              "progress",
                              "source",
                              "sourceProjectId",
                              "status",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "jobs",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored import job page cannot be represented safely",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Start a bounded import job",
        "description": "Create or trigger imports jobs.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_imports_jobs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Bounded import job created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "maxTraces": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000
                        },
                        "reprocessOfJobId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sourceProjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "const": "pending"
                        },
                        "windowFrom": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "windowTo": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "connectionId",
                        "createdAt",
                        "id",
                        "maxTraces",
                        "reprocessOfJobId",
                        "sourceProjectId",
                        "status",
                        "windowFrom",
                        "windowTo"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import connection not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Import job state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectionId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "sourceProjectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "maxTraces": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "windowFrom": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "windowTo": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "connectionId",
                  "sourceProjectId",
                  "maxTraces",
                  "windowFrom",
                  "windowTo"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/imports/jobs/{jobId}": {
      "get": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Get import job metadata",
        "description": "Fetch a specific imports jobs.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_imports_jobs_jobId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import job metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "failureCategory": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "authentication",
                                "configuration",
                                "provider",
                                "rate_limit",
                                "unknown"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "failedTraces": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "one_time",
                            "recurring"
                          ]
                        },
                        "partialFailure": {
                          "type": "boolean",
                          "const": true
                        },
                        "progress": {
                          "type": "object",
                          "properties": {
                            "processed": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "total": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "processed",
                            "total"
                          ],
                          "additionalProperties": false
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "langfuse",
                            "braintrust",
                            "raindrop",
                            "langsmith",
                            "phoenix",
                            "laminar",
                            "arize_ax"
                          ]
                        },
                        "sourceProjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "cancelled",
                            "failed",
                            "paused",
                            "pending",
                            "running",
                            "succeeded",
                            "unknown"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "connectionId",
                        "createdAt",
                        "failureCategory",
                        "id",
                        "mode",
                        "progress",
                        "source",
                        "sourceProjectId",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored import job cannot be represented safely",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/imports/jobs/{jobId}/cancel": {
      "post": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Cancel an import job",
        "description": "Create or trigger jobs cancel.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_imports_jobs_jobId_cancel",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import job cancelled",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "status": {
                          "type": "string",
                          "const": "cancelled"
                        }
                      },
                      "required": [
                        "id",
                        "updatedAt",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Import job state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/imports/jobs/{jobId}/pause": {
      "post": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Pause an import job",
        "description": "Create or trigger jobs pause.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_imports_jobs_jobId_pause",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import job paused",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "status": {
                          "type": "string",
                          "const": "paused"
                        }
                      },
                      "required": [
                        "id",
                        "updatedAt",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Import job state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/imports/jobs/{jobId}/reprocess": {
      "post": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Create a bounded reprocessing job",
        "description": "Create or trigger jobs reprocess.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_imports_jobs_jobId_reprocess",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Bounded import reprocessing job created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "maxTraces": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000
                        },
                        "reprocessOfJobId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sourceProjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "status": {
                          "type": "string",
                          "const": "pending"
                        },
                        "windowFrom": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "windowTo": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "connectionId",
                        "createdAt",
                        "id",
                        "maxTraces",
                        "reprocessOfJobId",
                        "sourceProjectId",
                        "status",
                        "windowFrom",
                        "windowTo"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Import job state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "maxTraces": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "windowFrom": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "windowTo": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  }
                },
                "required": [
                  "maxTraces",
                  "windowFrom",
                  "windowTo"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/imports/jobs/{jobId}/resume": {
      "post": {
        "tags": [
          "public",
          "imports",
          "configuration"
        ],
        "summary": "Resume a manually paused import job",
        "description": "Create or trigger jobs resume.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_imports_jobs_jobId_resume",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Import job resumed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "status": {
                          "type": "string",
                          "const": "pending"
                        }
                      },
                      "required": [
                        "id",
                        "updatedAt",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Import job not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Import job state conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "jobId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/incidents/external": {
      "post": {
        "tags": [
          "public",
          "incidents"
        ],
        "summary": "Publish a scoped native incident snapshot with revision fencing",
        "description": "Create or trigger incidents external.\n\n**Auth:** Requires a service-account Bearer token and explicit x-project-id; credential scope, current project binding, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_incidents_external",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Native incident snapshot receipt; fingerprint and revision are its replay identity",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "signal_id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "canonical_fingerprint": {
                          "type": "string"
                        },
                        "accepted_revision": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "applied": {
                          "type": "boolean"
                        },
                        "applied_occurrence_count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "signal_id",
                        "canonical_fingerprint",
                        "accepted_revision",
                        "applied",
                        "applied_occurrence_count"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Incident revision conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Incident snapshot evidence is invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "project_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "org_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "source": {
                    "type": "string",
                    "const": "incident_loop"
                  },
                  "incident_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "fingerprint": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "complete_snapshot": {
                    "type": "boolean"
                  },
                  "window_start": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "window_end": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240
                  },
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000
                  },
                  "severity": {
                    "default": "medium",
                    "type": "string",
                    "enum": [
                      "critical",
                      "high",
                      "medium",
                      "low"
                    ]
                  },
                  "attention_state": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "show",
                          "watch"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 32
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "workflow": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "failure_occurrences": {
                    "maxItems": 1000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "source_event_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "trace_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "span_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "observed_at": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "source_event_id",
                        "trace_id",
                        "observed_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "representative_samples": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "presentation": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "number",
                        "const": 1
                      },
                      "findings": {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2000
                            },
                            "basis": {
                              "type": "string",
                              "enum": [
                                "check_result",
                                "trace_observation",
                                "inference"
                              ]
                            },
                            "source_event_ids": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              }
                            }
                          },
                          "required": [
                            "id",
                            "text",
                            "basis",
                            "source_event_ids"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "open_questions": {
                        "maxItems": 8,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500
                        }
                      },
                      "coverage": {
                        "type": "object",
                        "properties": {
                          "judged_targets": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "census_turns": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "complete": {
                            "anyOf": [
                              {
                                "type": "boolean",
                                "const": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "limitations": {
                            "maxItems": 8,
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          }
                        },
                        "required": [
                          "judged_targets",
                          "census_turns",
                          "complete",
                          "limitations"
                        ],
                        "additionalProperties": false
                      },
                      "monitoring": {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "requirement_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "detection_id": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "draft_id": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "pending",
                                "active",
                                "inactive",
                                "blocked",
                                "failed",
                                "deleted",
                                "unknown"
                              ]
                            },
                            "config_fingerprint": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "backfill_status": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "requirement_id",
                            "detection_id",
                            "draft_id",
                            "state",
                            "config_fingerprint",
                            "backfill_status"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "version",
                      "findings",
                      "open_questions",
                      "coverage",
                      "monitoring"
                    ],
                    "additionalProperties": false
                  },
                  "overview": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "type": "number",
                        "const": 1
                      },
                      "examples": {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128,
                              "pattern": "\\S"
                            },
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1200,
                              "pattern": "\\S"
                            },
                            "source_event_ids": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              }
                            }
                          },
                          "required": [
                            "id",
                            "text",
                            "source_event_ids"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "example": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1200,
                            "pattern": "\\S"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "priority_assessment": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "priority": {
                                "type": "string",
                                "enum": [
                                  "critical",
                                  "high",
                                  "medium",
                                  "low",
                                  "unknown"
                                ]
                              },
                              "rationale": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 800,
                                "pattern": "\\S"
                              },
                              "source_event_ids": {
                                "minItems": 1,
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                }
                              },
                              "impact_basis": {
                                "type": "string",
                                "enum": [
                                  "observed",
                                  "sampled"
                                ]
                              },
                              "rubric_version": {
                                "type": "number",
                                "const": 1
                              }
                            },
                            "required": [
                              "priority",
                              "rationale",
                              "source_event_ids",
                              "impact_basis",
                              "rubric_version"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "confidence_assessment": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "evidence_receipts": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "factors": {
                                "type": "object",
                                "properties": {
                                  "evidence_strength": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "pattern_consistency": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "detection_alignment": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "historical_match": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "user_signal_weight": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "expected_impact": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  }
                                },
                                "required": [
                                  "evidence_strength",
                                  "pattern_consistency",
                                  "detection_alignment",
                                  "historical_match",
                                  "user_signal_weight",
                                  "expected_impact"
                                ],
                                "additionalProperties": false
                              },
                              "rationale": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 800,
                                "pattern": "\\S"
                              },
                              "source_event_ids": {
                                "minItems": 1,
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                }
                              },
                              "rubric_version": {
                                "type": "number",
                                "const": 1
                              },
                              "investigation_revision": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[a-f0-9]{32}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "factors",
                              "rationale",
                              "source_event_ids",
                              "rubric_version"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "review_id": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/PublicUuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "impact_sample": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "cohort": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "check_id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "check_revision": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "checked_at": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "trace_ids": {
                                "minItems": 1,
                                "maxItems": 2000,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "context_start": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "context_reason": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "cohort",
                              "check_id",
                              "check_revision",
                              "trace_ids"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "confirmation_source_event_ids": {
                        "default": [],
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        }
                      },
                      "representative_source_event_id": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "recommendation": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 2000
                                  },
                                  "steps": {
                                    "minItems": 1,
                                    "maxItems": 8,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    }
                                  },
                                  "source_event_ids": {
                                    "minItems": 1,
                                    "maxItems": 10,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    }
                                  },
                                  "investigation_thread_id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "investigation_revision": {
                                    "type": "string",
                                    "pattern": "^[a-f0-9]{32}$"
                                  }
                                },
                                "required": [
                                  "title",
                                  "steps",
                                  "source_event_ids",
                                  "investigation_thread_id",
                                  "investigation_revision"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 2000
                                  },
                                  "steps": {
                                    "minItems": 1,
                                    "maxItems": 8,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2000
                                    }
                                  },
                                  "source_event_ids": {
                                    "minItems": 1,
                                    "maxItems": 10,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    }
                                  },
                                  "investigation_thread_id": {
                                    "type": "null"
                                  },
                                  "investigation_revision": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "title",
                                  "steps",
                                  "source_event_ids"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "feedback_question": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              "source_event_ids": {
                                "minItems": 1,
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                }
                              }
                            },
                            "required": [
                              "id",
                              "text",
                              "source_event_ids"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "feedback_consumed": {
                        "default": [],
                        "maxItems": 25,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "answer_id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "run_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "answer_id",
                            "run_id"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "version"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "project_id",
                  "org_id",
                  "source",
                  "complete_snapshot",
                  "window_start",
                  "window_end",
                  "title",
                  "description",
                  "workflow",
                  "failure_occurrences"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/incidents/reviews": {
      "post": {
        "tags": [
          "public",
          "incidents"
        ],
        "summary": "Publish a scoped coordinated incident review with revision fencing",
        "description": "Create or trigger incidents reviews.\n\n**Auth:** Requires a service-account Bearer token and explicit x-project-id; credential scope, current project binding, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_incidents_reviews",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Coordinated review revision receipt",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "accepted_revision": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "applied": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "accepted_revision",
                        "applied"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Incident revision conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Incident snapshot evidence is invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "scope_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "workflow": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "running",
                      "completed",
                      "partial",
                      "failed"
                    ]
                  },
                  "started_at": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "completed_at": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "window_start": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "window_end": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "sampled": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "assessed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "eligible": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "receipts": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "run_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "Watcher",
                            "Surfacer",
                            "Curator",
                            "Investigation"
                          ]
                        },
                        "attempt": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "queued",
                            "running",
                            "completed",
                            "partial",
                            "failed",
                            "deferred"
                          ]
                        },
                        "started_at": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completed_at": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "summary": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "inputs": {
                          "default": [],
                          "maxItems": 25,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "signal_id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "input_revision": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "answer_ids": {
                                "default": [],
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                }
                              }
                            },
                            "required": [
                              "signal_id",
                              "input_revision"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "run_id",
                        "role",
                        "attempt",
                        "state",
                        "started_at",
                        "completed_at",
                        "summary"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "project_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "org_id": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "id",
                  "revision",
                  "scope_key",
                  "state",
                  "started_at",
                  "completed_at",
                  "window_start",
                  "window_end",
                  "sampled",
                  "assessed",
                  "eligible",
                  "receipts",
                  "project_id",
                  "org_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/ingest-credentials": {
      "get": {
        "tags": [
          "public",
          "access",
          "ingest-credentials"
        ],
        "summary": "List ingest-credential metadata",
        "description": "List or read public ingest-credentials.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_ingest_credentials",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded redacted ingest-credential metadata page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ingestCredentials": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "createdAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "expiresAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "lastFour": {
                                    "type": "string",
                                    "minLength": 4,
                                    "maxLength": 4
                                  },
                                  "lastUsedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "prefix": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 24
                                  },
                                  "revokedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "active",
                                      "expired",
                                      "revoked"
                                    ]
                                  },
                                  "updatedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "binding": {
                                    "type": "string",
                                    "const": "current_user"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "const": "personal_ingest"
                                  }
                                },
                                "required": [
                                  "createdAt",
                                  "expiresAt",
                                  "id",
                                  "lastFour",
                                  "lastUsedAt",
                                  "name",
                                  "prefix",
                                  "revokedAt",
                                  "state",
                                  "updatedAt",
                                  "binding",
                                  "kind"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "createdAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "expiresAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "lastFour": {
                                    "type": "string",
                                    "minLength": 4,
                                    "maxLength": 4
                                  },
                                  "lastUsedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "prefix": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 24
                                  },
                                  "revokedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "state": {
                                    "type": "string",
                                    "enum": [
                                      "active",
                                      "expired",
                                      "revoked"
                                    ]
                                  },
                                  "updatedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "binding": {
                                    "type": "string",
                                    "const": "selected_project"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "const": "project_ingest"
                                  }
                                },
                                "required": [
                                  "createdAt",
                                  "expiresAt",
                                  "id",
                                  "lastFour",
                                  "lastUsedAt",
                                  "name",
                                  "prefix",
                                  "revokedAt",
                                  "state",
                                  "updatedAt",
                                  "binding",
                                  "kind"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          }
                        },
                        "legacyPersonalWriteKey": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "configuredForSelectedOrganization": {
                                  "type": "boolean"
                                },
                                "createdAt": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicUtcTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "kind": {
                                  "type": "string",
                                  "const": "legacy_personal_write_key"
                                }
                              },
                              "required": [
                                "configuredForSelectedOrganization",
                                "createdAt",
                                "kind"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ingestCredentials",
                        "legacyPersonalWriteKey",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "access",
          "credentials"
        ],
        "summary": "Create a project ingest credential",
        "description": "Create or trigger public ingest-credentials.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_ingest_credentials",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Credential created; plaintext is returned once and client wrapped",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_ingest_credentials"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "operationId",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{22}$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential lifecycle conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresInDays": {
                    "default": 90,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "writeOnly": true
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/ingest-credentials/{credentialId}": {
      "delete": {
        "tags": [
          "public",
          "access",
          "credentials"
        ],
        "summary": "Revoke a project ingest credential",
        "description": "Delete public ingest-credentials.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_ingest_credentials_credentialId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Credential revoked",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "revokedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "state": {
                          "type": "string",
                          "const": "revoked"
                        }
                      },
                      "required": [
                        "id",
                        "revokedAt",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "credentialId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/public/ingest-credentials/{credentialId}/rotate": {
      "post": {
        "tags": [
          "public",
          "access",
          "credentials"
        ],
        "summary": "Rotate a project ingest credential",
        "description": "Create or trigger ingest-credentials rotate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_ingest_credentials_credentialId_rotate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Credential created; plaintext is returned once and client wrapped",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_ingest_credentials_credentialId_rotate"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "operationId",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{22}$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Credential lifecycle conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "credentialId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "writeOnly": true
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations": {
      "get": {
        "tags": [
          "public",
          "integrations"
        ],
        "summary": "List project integration status",
        "description": "List or read public integrations.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_integrations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted project integration status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "integrations": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "capabilities": {
                                "type": "object",
                                "properties": {
                                  "connectionMode": {
                                    "type": "string",
                                    "enum": [
                                      "api_key",
                                      "oauth"
                                    ]
                                  },
                                  "localStatus": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "connectionMode",
                                  "localStatus"
                                ],
                                "additionalProperties": false
                              },
                              "configured": {
                                "type": "boolean"
                              },
                              "connected": {
                                "type": "boolean"
                              },
                              "connectedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "providerId": {
                                "type": "string",
                                "enum": [
                                  "slack",
                                  "linear",
                                  "jira",
                                  "notion",
                                  "asana",
                                  "basecamp",
                                  "github",
                                  "github_pat",
                                  "linear_api"
                                ]
                              },
                              "updatedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "capabilities",
                              "configured",
                              "connected",
                              "connectedAt",
                              "createdAt",
                              "enabled",
                              "providerId",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "integrations"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Integration status is not representable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/integrations/{providerId}": {
      "delete": {
        "tags": [
          "public",
          "integrations",
          "configuration"
        ],
        "summary": "Disconnect a personal-token integration",
        "description": "Delete public integrations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_integrations_providerId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Integration disconnected",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "providerId": {
                          "type": "string",
                          "enum": [
                            "github_pat",
                            "linear_api"
                          ]
                        }
                      },
                      "required": [
                        "deleted",
                        "providerId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Integration not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "github_pat",
                "linear_api"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "type": "string",
                    "enum": [
                      "github_pat",
                      "linear_api"
                    ]
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "public",
          "integrations",
          "configuration"
        ],
        "summary": "Update a personal-token integration",
        "description": "Partially update public integrations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_integrations_providerId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Integration credentials updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "configured": {
                          "type": "boolean",
                          "const": true
                        },
                        "connected": {
                          "type": "boolean",
                          "const": true
                        },
                        "connectedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "providerId": {
                          "type": "string",
                          "enum": [
                            "github_pat",
                            "linear_api"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "configured",
                        "connected",
                        "connectedAt",
                        "providerId",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Integration not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Integration conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Integration credentials are invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "github_pat",
                "linear_api"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerId": {
                        "type": "string",
                        "const": "github_pat"
                      },
                      "token": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8192,
                        "pattern": "^[\\x21-\\x7e]+$",
                        "writeOnly": true
                      }
                    },
                    "required": [
                      "providerId",
                      "token"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "providerId": {
                        "type": "string",
                        "const": "linear_api"
                      },
                      "token": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8192,
                        "pattern": "^[\\x21-\\x7e]+$",
                        "writeOnly": true
                      }
                    },
                    "required": [
                      "providerId",
                      "token"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "integrations",
          "configuration"
        ],
        "summary": "Connect a personal-token integration",
        "description": "Create or trigger public integrations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_integrations_providerId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Integration connected",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "configured": {
                          "type": "boolean",
                          "const": true
                        },
                        "connected": {
                          "type": "boolean",
                          "const": true
                        },
                        "connectedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "providerId": {
                          "type": "string",
                          "enum": [
                            "github_pat",
                            "linear_api"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "configured",
                        "connected",
                        "connectedAt",
                        "providerId",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Integration is already connected",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Integration credentials are invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "github_pat",
                "linear_api"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerId": {
                        "type": "string",
                        "const": "github_pat"
                      },
                      "token": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8192,
                        "pattern": "^[\\x21-\\x7e]+$",
                        "writeOnly": true
                      }
                    },
                    "required": [
                      "providerId",
                      "token"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "providerId": {
                        "type": "string",
                        "const": "linear_api"
                      },
                      "token": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8192,
                        "pattern": "^[\\x21-\\x7e]+$",
                        "writeOnly": true
                      }
                    },
                    "required": [
                      "providerId",
                      "token"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/{providerId}/issue-runs": {
      "post": {
        "tags": [
          "public",
          "integrations",
          "issues"
        ],
        "summary": "Create a durable Linear or Jira issue run",
        "description": "Create or trigger integrations issue-runs.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_integrations_providerId_issue_runs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Durable issue creation run accepted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "type": "null"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "null"
                            },
                            "outboundStartedAt": {
                              "type": "null"
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "type": "null"
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "const": "pending"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "type": "null"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "null"
                            },
                            "outboundStartedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "const": "running"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "null"
                            },
                            "outboundStartedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "issue": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "identifier": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "url": {
                                  "type": "string",
                                  "maxLength": 2048,
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "id",
                                "identifier",
                                "title",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            "status": {
                              "type": "string",
                              "const": "succeeded"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "issue",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 96
                            },
                            "outboundStartedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "const": "failed"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 96
                            },
                            "outboundStartedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "const": "delivery_unknown"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "status"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Integration not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Issue run conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "linear",
                "jira"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assigneeId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "issueType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "labelIds": {
                    "default": [],
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  "priority": {
                    "default": "none",
                    "type": "string",
                    "enum": [
                      "none",
                      "urgent",
                      "high",
                      "medium",
                      "low"
                    ]
                  },
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "body",
                  "targetId",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/{providerId}/issue-runs/{runId}": {
      "get": {
        "tags": [
          "public",
          "integrations",
          "issues"
        ],
        "summary": "Get a durable issue creation run",
        "description": "Fetch a specific integrations issue-runs.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_integrations_providerId_issue_runs_runId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Issue creation run",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "type": "null"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "null"
                            },
                            "outboundStartedAt": {
                              "type": "null"
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "type": "null"
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "const": "pending"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "type": "null"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "null"
                            },
                            "outboundStartedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "const": "running"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "null"
                            },
                            "outboundStartedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "issue": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "identifier": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "url": {
                                  "type": "string",
                                  "maxLength": 2048,
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "id",
                                "identifier",
                                "title",
                                "url"
                              ],
                              "additionalProperties": false
                            },
                            "status": {
                              "type": "string",
                              "const": "succeeded"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "issue",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 96
                            },
                            "outboundStartedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "const": "failed"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "completedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "errorCode": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 96
                            },
                            "outboundStartedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "provider": {
                              "type": "string",
                              "enum": [
                                "linear",
                                "jira"
                              ]
                            },
                            "runId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "startedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "targetId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "const": "delivery_unknown"
                            }
                          },
                          "required": [
                            "completedAt",
                            "createdAt",
                            "errorCode",
                            "outboundStartedAt",
                            "provider",
                            "runId",
                            "startedAt",
                            "targetId",
                            "updatedAt",
                            "status"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Issue run not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "linear",
                "jira"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "runId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/{providerId}/issue-targets": {
      "get": {
        "tags": [
          "public",
          "integrations",
          "issues"
        ],
        "summary": "List bounded Linear or Jira issue targets",
        "description": "Fetch a specific integrations issue-targets.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_integrations_providerId_issue_targets",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded issue targets",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "targets": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "key": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "id",
                              "key",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "targets"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "linear",
                "jira"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/{providerId}/issue-targets/{targetId}/labels": {
      "get": {
        "tags": [
          "public",
          "integrations",
          "issues"
        ],
        "summary": "List bounded issue labels",
        "description": "Fetch a specific issue-targets labels.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_integrations_providerId_issue_targets_targetId_labels",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded issue labels",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "labels": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "labels",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "linear",
                "jira"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "targetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "targetId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/{providerId}/issue-targets/{targetId}/members": {
      "get": {
        "tags": [
          "public",
          "integrations",
          "issues"
        ],
        "summary": "List bounded issue members",
        "description": "Fetch a specific issue-targets members.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_integrations_providerId_issue_targets_targetId_members",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded issue members",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "members": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "email": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 320,
                                    "format": "email",
                                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "email",
                              "id",
                              "name"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "members",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "linear",
                "jira"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "targetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "targetId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/{providerId}/oauth-handoffs": {
      "post": {
        "tags": [
          "public",
          "integrations",
          "oauth"
        ],
        "summary": "Start a durable integration OAuth handoff",
        "description": "Create or trigger integrations oauth-handoffs.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_integrations_providerId_oauth_handoffs",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Durable integration OAuth handoff",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorizationUrl": {
                          "type": "string",
                          "maxLength": 4096,
                          "format": "uri",
                          "pattern": "^https:\\/\\/.*"
                        },
                        "expiresAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "handoffId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "providerId": {
                          "type": "string",
                          "enum": [
                            "slack",
                            "linear",
                            "jira",
                            "notion",
                            "asana",
                            "basecamp",
                            "github"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "const": "pending"
                        }
                      },
                      "required": [
                        "authorizationUrl",
                        "expiresAt",
                        "handoffId",
                        "providerId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "OAuth handoff conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "OAuth provider is unavailable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "slack",
                "linear",
                "jira",
                "notion",
                "asana",
                "basecamp",
                "github"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/{providerId}/oauth-handoffs/{handoffId}": {
      "get": {
        "tags": [
          "public",
          "integrations",
          "oauth"
        ],
        "summary": "Get a durable integration OAuth handoff",
        "description": "Fetch a specific integrations oauth-handoffs.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_integrations_providerId_oauth_handoffs_handoffId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Integration OAuth handoff status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completionOutcome": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "connected",
                                "access_denied",
                                "authorization_revoked",
                                "invalid_callback",
                                "not_configured",
                                "token_exchange_failed",
                                "provider_error",
                                "workspace_conflict",
                                "expired"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "expiresAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "handoffId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "providerId": {
                          "type": "string",
                          "enum": [
                            "slack",
                            "linear",
                            "jira",
                            "notion",
                            "asana",
                            "basecamp",
                            "github"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "succeeded",
                            "failed",
                            "denied",
                            "expired"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "completedAt",
                        "completionOutcome",
                        "createdAt",
                        "expiresAt",
                        "handoffId",
                        "providerId",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "OAuth handoff not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "slack",
                "linear",
                "jira",
                "notion",
                "asana",
                "basecamp",
                "github"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "handoffId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "handoffId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/{providerId}/test": {
      "post": {
        "tags": [
          "public",
          "integrations"
        ],
        "summary": "Test a reviewed integration provider connection",
        "description": "Create or trigger integrations test.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_integrations_providerId_test",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Integration provider connection test",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connected": {
                          "type": "boolean",
                          "const": true
                        },
                        "providerId": {
                          "type": "string",
                          "enum": [
                            "slack",
                            "linear",
                            "jira",
                            "notion",
                            "asana",
                            "basecamp",
                            "github",
                            "github_pat",
                            "linear_api"
                          ]
                        },
                        "testedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "connected",
                        "providerId",
                        "testedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Integration not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Integration provider rejected the connection",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "providerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "slack",
                "linear",
                "jira",
                "notion",
                "asana",
                "basecamp",
                "github",
                "github_pat",
                "linear_api"
              ]
            },
            "description": "providerId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/integrations/providers": {
      "get": {
        "tags": [
          "public",
          "integrations"
        ],
        "summary": "List integration provider capabilities",
        "description": "List or read integrations providers.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_integrations_providers",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Reviewed integration provider capabilities",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "providers": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "capabilities": {
                                "type": "object",
                                "properties": {
                                  "connectionMode": {
                                    "type": "string",
                                    "enum": [
                                      "api_key",
                                      "oauth"
                                    ]
                                  },
                                  "localStatus": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "connectionMode",
                                  "localStatus"
                                ],
                                "additionalProperties": false
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 80
                              },
                              "id": {
                                "type": "string",
                                "enum": [
                                  "slack",
                                  "linear",
                                  "jira",
                                  "notion",
                                  "asana",
                                  "basecamp",
                                  "github",
                                  "github_pat",
                                  "linear_api"
                                ]
                              }
                            },
                            "required": [
                              "capabilities",
                              "displayName",
                              "id"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "providers"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Integration status is not representable",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/invitations/accept": {
      "post": {
        "tags": [
          "public",
          "organizations",
          "invitations"
        ],
        "summary": "Accept an organization invitation",
        "description": "Create or trigger invitations accept.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_invitations_accept",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Accept an organization invitation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "membership": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                            },
                            "joinedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "owner",
                                "admin",
                                "member",
                                "guest"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "const": "active"
                            }
                          },
                          "required": [
                            "id",
                            "joinedAt",
                            "role",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        "organizationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "membership",
                        "organizationId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "organization:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 255,
                    "writeOnly": true
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ]
      }
    },
    "/api/v1/public/mcp/connections": {
      "get": {
        "tags": [
          "public",
          "mcp",
          "configuration"
        ],
        "summary": "List MCP connections",
        "description": "List or read mcp connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_mcp_connections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted current-user MCP connections",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connections": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "configuredHeaderNames": {
                                "maxItems": 32,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"
                                }
                              },
                              "connectionId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "connected",
                                  "failed",
                                  "untested"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "configuredHeaderNames",
                              "connectionId",
                              "createdAt",
                              "enabled",
                              "name",
                              "status",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "connections",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "mcp",
          "configuration"
        ],
        "summary": "Connect an MCP server",
        "description": "Create or trigger mcp connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_mcp_connections",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "MCP connection created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "configuredHeaderNames": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"
                          }
                        },
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "connected",
                            "failed",
                            "untested"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "const": "custom_mcp"
                        }
                      },
                      "required": [
                        "configuredHeaderNames",
                        "connectionId",
                        "enabled",
                        "name",
                        "status",
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored MCP connection is invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  },
                  "headers": {
                    "additionalProperties": {
                      "maxLength": 8192,
                      "minLength": 1,
                      "pattern": "^[^\\r\\n\\u0000]+$",
                      "type": "string",
                      "writeOnly": true
                    },
                    "maxProperties": 32,
                    "propertyNames": {
                      "pattern": "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$",
                      "type": "string"
                    },
                    "type": "object",
                    "default": {}
                  },
                  "name": {
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^(?=.*\\S)[^\\u0000-\\u001f\\u007f]+$",
                    "type": "string"
                  },
                  "url": {
                    "format": "uri",
                    "maxLength": 2048,
                    "pattern": "^https:\\/\\/[^\\s/?#@]+(?:\\/[^\\s?#]*)?$",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "url"
                ],
                "type": "object"
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/mcp/connections/{connectionId}": {
      "delete": {
        "tags": [
          "public",
          "mcp",
          "configuration"
        ],
        "summary": "Disconnect an MCP connection",
        "description": "Delete mcp connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_mcp_connections_connectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "MCP connection disconnected",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "disconnected": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "connectionId",
                        "disconnected"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "public",
          "mcp",
          "configuration"
        ],
        "summary": "Update an MCP connection",
        "description": "Partially update mcp connections.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_mcp_connections_connectionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "MCP connection updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "configuredHeaderNames": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$"
                          }
                        },
                        "connectionId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "connected",
                            "failed",
                            "untested"
                          ]
                        },
                        "kind": {
                          "type": "string",
                          "const": "custom_mcp"
                        }
                      },
                      "required": [
                        "configuredHeaderNames",
                        "connectionId",
                        "enabled",
                        "name",
                        "status",
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored MCP connection is invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "connectionId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "headers": {
                        "additionalProperties": {
                          "maxLength": 8192,
                          "minLength": 1,
                          "pattern": "^[^\\r\\n\\u0000]+$",
                          "type": "string",
                          "writeOnly": true
                        },
                        "maxProperties": 32,
                        "propertyNames": {
                          "pattern": "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$",
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "name": {
                        "maxLength": 128,
                        "minLength": 1,
                        "pattern": "^(?=.*\\S)[^\\u0000-\\u001f\\u007f]+$",
                        "type": "string"
                      },
                      "url": {
                        "format": "uri",
                        "maxLength": 2048,
                        "pattern": "^https:\\/\\/[^\\s/?#@]+(?:\\/[^\\s?#]*)?$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "enabled"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "headers": {
                        "additionalProperties": {
                          "maxLength": 8192,
                          "minLength": 1,
                          "pattern": "^[^\\r\\n\\u0000]+$",
                          "type": "string",
                          "writeOnly": true
                        },
                        "maxProperties": 32,
                        "propertyNames": {
                          "pattern": "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$",
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "name": {
                        "maxLength": 128,
                        "minLength": 1,
                        "pattern": "^(?=.*\\S)[^\\u0000-\\u001f\\u007f]+$",
                        "type": "string"
                      },
                      "url": {
                        "format": "uri",
                        "maxLength": 2048,
                        "pattern": "^https:\\/\\/[^\\s/?#@]+(?:\\/[^\\s?#]*)?$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "headers"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "headers": {
                        "additionalProperties": {
                          "maxLength": 8192,
                          "minLength": 1,
                          "pattern": "^[^\\r\\n\\u0000]+$",
                          "type": "string",
                          "writeOnly": true
                        },
                        "maxProperties": 32,
                        "propertyNames": {
                          "pattern": "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$",
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "name": {
                        "maxLength": 128,
                        "minLength": 1,
                        "pattern": "^(?=.*\\S)[^\\u0000-\\u001f\\u007f]+$",
                        "type": "string"
                      },
                      "url": {
                        "format": "uri",
                        "maxLength": 2048,
                        "pattern": "^https:\\/\\/[^\\s/?#@]+(?:\\/[^\\s?#]*)?$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "headers": {
                        "additionalProperties": {
                          "maxLength": 8192,
                          "minLength": 1,
                          "pattern": "^[^\\r\\n\\u0000]+$",
                          "type": "string",
                          "writeOnly": true
                        },
                        "maxProperties": 32,
                        "propertyNames": {
                          "pattern": "^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$",
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "name": {
                        "maxLength": 128,
                        "minLength": 1,
                        "pattern": "^(?=.*\\S)[^\\u0000-\\u001f\\u007f]+$",
                        "type": "string"
                      },
                      "url": {
                        "format": "uri",
                        "maxLength": 2048,
                        "pattern": "^https:\\/\\/[^\\s/?#@]+(?:\\/[^\\s?#]*)?$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "url"
                    ],
                    "type": "object"
                  }
                ]
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/mcp/status": {
      "get": {
        "tags": [
          "public",
          "mcp",
          "configuration"
        ],
        "summary": "Get MCP configuration status",
        "description": "List or read mcp status.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_mcp_status",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted current-user MCP configuration status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "composio": {
                          "type": "object",
                          "properties": {
                            "configured": {
                              "type": "boolean"
                            },
                            "configuredToolkitCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "configured",
                            "configuredToolkitCount"
                          ],
                          "additionalProperties": false
                        },
                        "custom": {
                          "type": "object",
                          "properties": {
                            "configured": {
                              "type": "boolean"
                            },
                            "configuredCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "connectedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "enabledCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "failedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "lastCheckedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "untestedCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "configured",
                            "configuredCount",
                            "connectedCount",
                            "enabledCount",
                            "failedCount",
                            "lastCheckedAt",
                            "untestedCount"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "composio",
                        "custom"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/notification-preferences": {
      "get": {
        "tags": [
          "public",
          "notifications"
        ],
        "summary": "Get current notification preferences",
        "description": "List or read public notification-preferences.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_notification_preferences",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Current notification preferences",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "approvalRequests": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "commentsMentions": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "criticalAlerts": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "incidentAlerts": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "dailyDigest": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "digestTime": {
                          "type": "string",
                          "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                        },
                        "digestTimezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evalAssignments": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "evalUpdates": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "experimentUpdates": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "nonCriticalAlerts": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "promptChanges": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "quietHoursEnd": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "quietHoursStart": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "quietHoursTimezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "slackDmEnabled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "approvalRequests",
                        "commentsMentions",
                        "configured",
                        "criticalAlerts",
                        "incidentAlerts",
                        "dailyDigest",
                        "digestTime",
                        "digestTimezone",
                        "evalAssignments",
                        "evalUpdates",
                        "experimentUpdates",
                        "nonCriticalAlerts",
                        "promptChanges",
                        "quietHoursEnd",
                        "quietHoursStart",
                        "quietHoursTimezone",
                        "slackDmEnabled"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "profile:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "patch": {
        "tags": [
          "public",
          "notifications"
        ],
        "summary": "Update current notification preferences",
        "description": "Partially update public notification-preferences.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_notification_preferences",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Current notification preferences after update",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "approvalRequests": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "commentsMentions": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "configured": {
                          "type": "boolean"
                        },
                        "criticalAlerts": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "incidentAlerts": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "dailyDigest": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "digestTime": {
                          "type": "string",
                          "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                        },
                        "digestTimezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "evalAssignments": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "evalUpdates": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "experimentUpdates": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "nonCriticalAlerts": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "promptChanges": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "slack": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "slack"
                          ],
                          "additionalProperties": false
                        },
                        "quietHoursEnd": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "quietHoursStart": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "quietHoursTimezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "slackDmEnabled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "approvalRequests",
                        "commentsMentions",
                        "configured",
                        "criticalAlerts",
                        "incidentAlerts",
                        "dailyDigest",
                        "digestTime",
                        "digestTimezone",
                        "evalAssignments",
                        "evalUpdates",
                        "experimentUpdates",
                        "nonCriticalAlerts",
                        "promptChanges",
                        "quietHoursEnd",
                        "quietHoursStart",
                        "quietHoursTimezone",
                        "slackDmEnabled"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "profile:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approvalRequests": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "commentsMentions": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "criticalAlerts": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "incidentAlerts": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "dailyDigest": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "digestTime": {
                    "type": "string",
                    "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                  },
                  "digestTimezone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evalAssignments": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "evalUpdates": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "experimentUpdates": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "nonCriticalAlerts": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "promptChanges": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "boolean"
                      },
                      "slack": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "email",
                      "slack"
                    ],
                    "additionalProperties": false
                  },
                  "quietHoursEnd": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "quietHoursStart": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "quietHoursTimezone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "slackDmEnabled": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/organizations": {
      "get": {
        "tags": [
          "public",
          "organizations"
        ],
        "summary": "List organizations",
        "description": "List or read public organizations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded organization page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "organizations": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string",
                                "maxLength": 255
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "owner",
                                  "admin",
                                  "member",
                                  "guest"
                                ]
                              },
                              "updatedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "createdAt",
                              "id",
                              "name",
                              "role",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "organizations",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "context:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          }
        ]
      }
    },
    "/api/v1/public/organizations/{organizationId}": {
      "get": {
        "tags": [
          "public",
          "organizations"
        ],
        "summary": "Get an organization",
        "description": "Fetch a specific public organizations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Organization metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "guest"
                          ]
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "role",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/audit/events": {
      "get": {
        "tags": [
          "public",
          "audit",
          "access"
        ],
        "summary": "List credential lifecycle audit events",
        "description": "Fetch a specific audit events.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_audit_events",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded credential lifecycle audit page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "action": {
                                "type": "string",
                                "enum": [
                                  "oauth.authorization_granted",
                                  "oauth.device_approved",
                                  "oauth.device_denied",
                                  "oauth.refresh_reuse_detected",
                                  "oauth.token_issued",
                                  "oauth.token_refreshed",
                                  "oauth.token_revoked",
                                  "public_api_key.created",
                                  "public_api_key.revoked",
                                  "public_api_key.rotated",
                                  "ingest_credential.created",
                                  "ingest_credential.revoked",
                                  "ingest_credential.rotated",
                                  "service_account.binding_created",
                                  "service_account.binding_deleted",
                                  "service_account.binding_role_updated",
                                  "service_account.created",
                                  "service_account.disabled",
                                  "service_account.token_minted",
                                  "service_account.token_revoked",
                                  "service_account.token_rotated",
                                  "service_account.updated"
                                ]
                              },
                              "actorType": {
                                "type": "string",
                                "enum": [
                                  "legacy_public_api_key",
                                  "oauth_user",
                                  "service",
                                  "service_account",
                                  "superuser",
                                  "unknown",
                                  "user"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "maxLength": 64,
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "metadata": {
                                "type": "object",
                                "properties": {
                                  "bindingCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 1000
                                  },
                                  "expiresAt": {
                                    "type": "string",
                                    "maxLength": 64,
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                  },
                                  "predecessorTokenId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "scopeCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 64
                                  },
                                  "serviceAccountId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "tokenId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "organizationId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "projectId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "resourceType": {
                                "type": "string",
                                "enum": [
                                  "oauth_access_token",
                                  "oauth_authorization",
                                  "oauth_device_authorization",
                                  "oauth_refresh_token_family",
                                  "public_api_key",
                                  "project_ingest",
                                  "service_account",
                                  "service_account_project_binding",
                                  "service_account_token"
                                ]
                              }
                            },
                            "required": [
                              "action",
                              "actorType",
                              "createdAt",
                              "id",
                              "metadata",
                              "organizationId",
                              "projectId",
                              "resourceId",
                              "resourceType"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "events",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/audit/events/export": {
      "get": {
        "tags": [
          "public",
          "audit",
          "access"
        ],
        "summary": "Export credential lifecycle audit events",
        "description": "Fetch a specific events export.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_audit_events_export",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded credential lifecycle audit export",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "maxItems": 5000,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "action": {
                                "type": "string",
                                "enum": [
                                  "oauth.authorization_granted",
                                  "oauth.device_approved",
                                  "oauth.device_denied",
                                  "oauth.refresh_reuse_detected",
                                  "oauth.token_issued",
                                  "oauth.token_refreshed",
                                  "oauth.token_revoked",
                                  "public_api_key.created",
                                  "public_api_key.revoked",
                                  "public_api_key.rotated",
                                  "ingest_credential.created",
                                  "ingest_credential.revoked",
                                  "ingest_credential.rotated",
                                  "service_account.binding_created",
                                  "service_account.binding_deleted",
                                  "service_account.binding_role_updated",
                                  "service_account.created",
                                  "service_account.disabled",
                                  "service_account.token_minted",
                                  "service_account.token_revoked",
                                  "service_account.token_rotated",
                                  "service_account.updated"
                                ]
                              },
                              "actorType": {
                                "type": "string",
                                "enum": [
                                  "legacy_public_api_key",
                                  "oauth_user",
                                  "service",
                                  "service_account",
                                  "superuser",
                                  "unknown",
                                  "user"
                                ]
                              },
                              "createdAt": {
                                "type": "string",
                                "maxLength": 64,
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "metadata": {
                                "type": "object",
                                "properties": {
                                  "bindingCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 1000
                                  },
                                  "expiresAt": {
                                    "type": "string",
                                    "maxLength": 64,
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                  },
                                  "predecessorTokenId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "scopeCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 64
                                  },
                                  "serviceAccountId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "tokenId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "organizationId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "projectId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "resourceId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "resourceType": {
                                "type": "string",
                                "enum": [
                                  "oauth_access_token",
                                  "oauth_authorization",
                                  "oauth_device_authorization",
                                  "oauth_refresh_token_family",
                                  "public_api_key",
                                  "project_ingest",
                                  "service_account",
                                  "service_account_project_binding",
                                  "service_account_token"
                                ]
                              }
                            },
                            "required": [
                              "action",
                              "actorType",
                              "createdAt",
                              "id",
                              "metadata",
                              "organizationId",
                              "projectId",
                              "resourceId",
                              "resourceType"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "export": {
                          "type": "object",
                          "properties": {
                            "format": {
                              "type": "string",
                              "const": "neatlogs.audit.lifecycle.v1"
                            },
                            "from": {
                              "type": "string",
                              "maxLength": 64,
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 5000
                            },
                            "rowCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 5000
                            },
                            "to": {
                              "type": "string",
                              "maxLength": 64,
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            },
                            "truncated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "format",
                            "from",
                            "limit",
                            "rowCount",
                            "to",
                            "truncated"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "events",
                        "export"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "description": "from query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 5000,
              "type": "integer",
              "minimum": 1,
              "maximum": 5000
            },
            "description": "limit query parameter"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "description": "to query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/billing/plans": {
      "get": {
        "tags": [
          "public",
          "organizations",
          "billing"
        ],
        "summary": "List organization billing plans",
        "description": "Fetch a specific billing plans.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_billing_plans",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "List organization billing plans",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "plans": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "description": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "features": {
                                "maxItems": 200,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "isPopular": {
                                "type": "boolean"
                              },
                              "limits": {
                                "type": "object",
                                "properties": {
                                  "events": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "projects": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "teams": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "apiCallsPerMinute": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "storageMb": {
                                    "anyOf": [
                                      {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "events",
                                  "projects",
                                  "teams",
                                  "apiCallsPerMinute",
                                  "storageMb"
                                ],
                                "additionalProperties": false
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "pricing": {
                                "type": "object",
                                "properties": {
                                  "currency": {
                                    "type": "string",
                                    "minLength": 3,
                                    "maxLength": 10
                                  },
                                  "monthly": {
                                    "type": "number",
                                    "minimum": 0
                                  },
                                  "yearly": {
                                    "type": "number",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "currency",
                                  "monthly",
                                  "yearly"
                                ],
                                "additionalProperties": false
                              },
                              "type": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              }
                            },
                            "required": [
                              "description",
                              "features",
                              "isPopular",
                              "limits",
                              "name",
                              "pricing",
                              "type"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "plans"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/billing/subscription": {
      "get": {
        "tags": [
          "public",
          "organizations",
          "billing"
        ],
        "summary": "Get organization billing subscription",
        "description": "Fetch a specific billing subscription.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_billing_subscription",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Get organization billing subscription",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "billingCycle": {
                          "type": "object",
                          "properties": {
                            "end": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "start": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "end",
                            "start"
                          ],
                          "additionalProperties": false
                        },
                        "isActive": {
                          "type": "boolean"
                        },
                        "limits": {
                          "type": "object",
                          "properties": {
                            "events": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "projects": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "teams": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "events",
                            "projects",
                            "teams"
                          ],
                          "additionalProperties": false
                        },
                        "plan": {
                          "type": "object",
                          "properties": {
                            "displayName": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 50
                            }
                          },
                          "required": [
                            "displayName",
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "cancelled",
                            "past_due",
                            "trial"
                          ]
                        },
                        "trialEndsAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "billingCycle",
                        "isActive",
                        "limits",
                        "plan",
                        "status",
                        "trialEndsAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/billing/usage": {
      "get": {
        "tags": [
          "public",
          "organizations",
          "billing"
        ],
        "summary": "Get organization billing usage",
        "description": "Fetch a specific billing usage.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_billing_usage",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Get organization billing usage",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "billingCycleEnd": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "plan": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "active",
                                "cancelled",
                                "past_due",
                                "trial"
                              ]
                            },
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 50
                            }
                          },
                          "required": [
                            "status",
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        "resources": {
                          "type": "object",
                          "properties": {
                            "events": {
                              "type": "object",
                              "properties": {
                                "allowed": {
                                  "type": "boolean"
                                },
                                "current": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "limit": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "percentage": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "remaining": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "allowed",
                                "current",
                                "limit",
                                "percentage",
                                "remaining"
                              ],
                              "additionalProperties": false
                            },
                            "projects": {
                              "type": "object",
                              "properties": {
                                "allowed": {
                                  "type": "boolean"
                                },
                                "current": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "limit": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "percentage": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "remaining": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "allowed",
                                "current",
                                "limit",
                                "percentage",
                                "remaining"
                              ],
                              "additionalProperties": false
                            },
                            "teams": {
                              "type": "object",
                              "properties": {
                                "allowed": {
                                  "type": "boolean"
                                },
                                "current": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "limit": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "percentage": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "remaining": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "allowed",
                                "current",
                                "limit",
                                "percentage",
                                "remaining"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "events",
                            "projects",
                            "teams"
                          ],
                          "additionalProperties": false
                        },
                        "trialEndsAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "billingCycleEnd",
                        "plan",
                        "resources",
                        "trialEndsAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/billing/usage-alerts": {
      "get": {
        "tags": [
          "public",
          "organizations",
          "billing"
        ],
        "summary": "List organization billing usage alerts",
        "description": "Fetch a specific billing usage-alerts.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_billing_usage_alerts",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "List organization billing usage alerts",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "alerts": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "acknowledged": {
                                "type": "boolean"
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "currentUsage": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "id": {
                                "type": "string",
                                "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                              },
                              "isRead": {
                                "type": "boolean"
                              },
                              "limit": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "message": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 2000
                              },
                              "resource": {
                                "type": "string",
                                "enum": [
                                  "events",
                                  "projects",
                                  "storage",
                                  "teams"
                                ]
                              },
                              "severity": {
                                "type": "string",
                                "enum": [
                                  "info",
                                  "warning",
                                  "critical"
                                ]
                              },
                              "threshold": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "approaching_limit",
                                  "limit_exceeded",
                                  "trial_expiring"
                                ]
                              }
                            },
                            "required": [
                              "acknowledged",
                              "createdAt",
                              "currentUsage",
                              "id",
                              "isRead",
                              "limit",
                              "message",
                              "resource",
                              "severity",
                              "threshold",
                              "type"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "snapshotAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "alerts",
                        "page",
                        "snapshotAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "unread",
                "unacknowledged",
                "unread-and-unacknowledged"
              ]
            },
            "description": "state query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "billing:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/invitations": {
      "get": {
        "tags": [
          "public",
          "organizations",
          "invitations"
        ],
        "summary": "List organization invitations",
        "description": "Fetch a specific organizations invitations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_invitations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "List organization invitations",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "invitations": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "email": {
                                "type": "string",
                                "maxLength": 255,
                                "format": "email",
                                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                              },
                              "expiresAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "admin",
                                  "member",
                                  "guest"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "pending",
                                  "expired"
                                ]
                              }
                            },
                            "required": [
                              "createdAt",
                              "email",
                              "expiresAt",
                              "id",
                              "role",
                              "state"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "invitations",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "default": "pending",
              "type": "string",
              "enum": [
                "all",
                "pending",
                "expired"
              ]
            },
            "description": "state query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "organizations",
          "invitations"
        ],
        "summary": "Invite an organization member",
        "description": "Create or trigger organizations invitations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_organizations_organizationId_invitations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Invite an organization member",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "email": {
                          "type": "string",
                          "maxLength": 255,
                          "format": "email",
                          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                        },
                        "expiresAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "admin",
                            "member",
                            "guest"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "expired"
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "email",
                        "expiresAt",
                        "id",
                        "role",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 255,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member",
                      "guest"
                    ]
                  }
                },
                "required": [
                  "email",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/invitations/{invitationId}": {
      "delete": {
        "tags": [
          "public",
          "organizations",
          "invitations"
        ],
        "summary": "Revoke an organization invitation",
        "description": "Delete organizations invitations.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_organizations_organizationId_invitations_invitationId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Revoke an organization invitation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "maxLength": 255,
                          "format": "email",
                          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "revoked": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "email",
                        "id",
                        "revoked"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "invitationId path parameter"
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 255,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "invitationId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "email",
                  "invitationId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/public/organizations/{organizationId}/invitations/{invitationId}/resend": {
      "post": {
        "tags": [
          "public",
          "organizations",
          "invitations"
        ],
        "summary": "Resend an organization invitation",
        "description": "Create or trigger invitations resend.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_organizations_organizationId_invitations_invitationId_resend",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Resend an organization invitation",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "email": {
                          "type": "string",
                          "maxLength": 255,
                          "format": "email",
                          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                        },
                        "expiresAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "admin",
                            "member",
                            "guest"
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "expired"
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "email",
                        "expiresAt",
                        "id",
                        "role",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "invitationId path parameter"
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 255,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/members": {
      "get": {
        "tags": [
          "public",
          "organizations",
          "members"
        ],
        "summary": "List organization members",
        "description": "Fetch a specific organizations members.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_members",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "List organization members",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "members": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "email": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255,
                                    "format": "email",
                                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "membership": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                                  },
                                  "joinedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUtcTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "owner",
                                      "admin",
                                      "member",
                                      "guest"
                                    ]
                                  },
                                  "status": {
                                    "type": "string",
                                    "const": "active"
                                  }
                                },
                                "required": [
                                  "id",
                                  "joinedAt",
                                  "role",
                                  "status"
                                ],
                                "additionalProperties": false
                              },
                              "name": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "userId": {
                                "type": "string",
                                "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                              }
                            },
                            "required": [
                              "email",
                              "membership",
                              "name",
                              "userId"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "members",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/members/{userId}": {
      "delete": {
        "tags": [
          "public",
          "organizations",
          "members"
        ],
        "summary": "Remove an organization member",
        "description": "Delete organizations members.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_organizations_organizationId_members_userId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Remove an organization member",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "membershipId": {
                          "type": "string",
                          "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                        },
                        "removed": {
                          "type": "boolean",
                          "const": true
                        },
                        "userId": {
                          "type": "string",
                          "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                        }
                      },
                      "required": [
                        "membershipId",
                        "removed",
                        "userId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
            },
            "description": "userId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRole": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member",
                      "guest"
                    ]
                  },
                  "membershipId": {
                    "type": "string",
                    "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                  }
                },
                "required": [
                  "expectedRole",
                  "membershipId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "organizations",
          "members"
        ],
        "summary": "Get an organization member",
        "description": "Fetch a specific organizations members.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_members_userId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Get an organization member",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255,
                              "format": "email",
                              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "membership": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                            },
                            "joinedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "owner",
                                "admin",
                                "member",
                                "guest"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "const": "active"
                            }
                          },
                          "required": [
                            "id",
                            "joinedAt",
                            "role",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "userId": {
                          "type": "string",
                          "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                        }
                      },
                      "required": [
                        "email",
                        "membership",
                        "name",
                        "userId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
            },
            "description": "userId path parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "organizations",
          "members"
        ],
        "summary": "Update an organization member role",
        "description": "Partially update organizations members.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_organizations_organizationId_members_userId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Update an organization member role",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255,
                              "format": "email",
                              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "membership": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                            },
                            "joinedAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUtcTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "role": {
                              "type": "string",
                              "enum": [
                                "owner",
                                "admin",
                                "member",
                                "guest"
                              ]
                            },
                            "status": {
                              "type": "string",
                              "const": "active"
                            }
                          },
                          "required": [
                            "id",
                            "joinedAt",
                            "role",
                            "status"
                          ],
                          "additionalProperties": false
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "userId": {
                          "type": "string",
                          "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                        }
                      },
                      "required": [
                        "email",
                        "membership",
                        "name",
                        "userId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
            },
            "description": "userId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRole": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member",
                      "guest"
                    ]
                  },
                  "membershipId": {
                    "type": "string",
                    "pattern": "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member",
                      "guest"
                    ]
                  }
                },
                "required": [
                  "expectedRole",
                  "membershipId",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/projects": {
      "post": {
        "tags": [
          "public",
          "projects"
        ],
        "summary": "Create a project",
        "description": "Create or trigger organizations projects.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_organizations_organizationId_projects",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Project created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "orgId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "tier": {
                          "type": "string",
                          "maxLength": 50
                        },
                        "timezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "isArchived",
                        "isDefault",
                        "name",
                        "orgId",
                        "tier",
                        "timezone",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "project:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "timezone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/roles": {
      "get": {
        "tags": [
          "public",
          "organizations",
          "roles"
        ],
        "summary": "List assignable organization roles",
        "description": "Fetch a specific organizations roles.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_roles",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "List assignable organization roles",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "invitation",
                            "member-role-change"
                          ]
                        },
                        "roles": {
                          "maxItems": 3,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "description": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "admin",
                                  "member",
                                  "guest"
                                ]
                              }
                            },
                            "required": [
                              "description",
                              "label",
                              "role"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "action",
                        "roles"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "invitation",
                "member-role-change"
              ]
            },
            "description": "action query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "organization:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/organizations/{organizationId}/service-accounts": {
      "get": {
        "tags": [
          "public",
          "service-accounts"
        ],
        "summary": "List organization service accounts",
        "description": "Fetch a specific organizations service-accounts.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_organizations_organizationId_service_accounts",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Organization service accounts",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "serviceAccounts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "description": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 10000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "disabledAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "organizationId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "disabled"
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "createdAt",
                              "description",
                              "disabledAt",
                              "id",
                              "name",
                              "organizationId",
                              "status",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "serviceAccounts"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "service-accounts"
        ],
        "summary": "Create a service account with initial project bindings",
        "description": "Create or trigger organizations service-accounts.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_organizations_organizationId_service_accounts",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Service account created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "disabledAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "organizationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "disabled"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "disabledAt",
                        "id",
                        "name",
                        "organizationId",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bindings": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "project_admin",
                            "project_member",
                            "project_viewer"
                          ]
                        }
                      },
                      "required": [
                        "projectId",
                        "role"
                      ],
                      "additionalProperties": false
                    },
                    "uniqueItems": true
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "bindings",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/project": {
      "delete": {
        "tags": [
          "public",
          "projects"
        ],
        "summary": "Soft-delete a project",
        "description": "Organization owners and admins can soft-delete a project using the dashboard lifecycle. This hides the project while preserving stored data. It does not schedule a purge or create a recovery window. Exact idempotency retries require current manager authorization; a new key cannot delete an already deleted project.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_project",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Project deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "isDeleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "isDeleted",
                        "projectId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Project deletion is pending",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "project:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get public project metadata",
        "description": "List or read public project.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_project",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Project metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "orgId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "tier": {
                          "type": "string",
                          "maxLength": 50
                        },
                        "timezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "isArchived",
                        "isDefault",
                        "name",
                        "orgId",
                        "tier",
                        "timezone",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "context:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "description": "Required for service-account and OAuth credentials; optional for legacy keys",
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "patch": {
        "tags": [
          "public",
          "projects"
        ],
        "summary": "Update a project",
        "description": "Partially update public project.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_project",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Project updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "isDefault": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 255
                        },
                        "orgId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "tier": {
                          "type": "string",
                          "maxLength": 50
                        },
                        "timezone": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "isArchived",
                        "isDefault",
                        "name",
                        "orgId",
                        "tier",
                        "timezone",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "project:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "timezone": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/project/access/{userId}": {
      "delete": {
        "tags": [
          "public",
          "projects",
          "access"
        ],
        "summary": "Remove a project access override",
        "description": "Current organization owners and admins can remove an existing member's project override. Inherited organization access may remain; this does not remove organization membership.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_project_access_userId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Project access override state",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "overrideRole": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "project_admin",
                                "project_member",
                                "project_viewer"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "userId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "overrideRole",
                        "projectId",
                        "userId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project or organization member not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Project deletion is pending",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "userId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "project:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "public",
          "projects",
          "access"
        ],
        "summary": "Grant a project access override",
        "description": "Current organization owners and admins can grant an existing active organization member a project override. Guests can receive only project_viewer. This does not invite a new user or grant organization membership.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "put_api_v1_public_project_access_userId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Project access override state",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "overrideRole": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "project_admin",
                                "project_member",
                                "project_viewer"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "userId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "overrideRole",
                        "projectId",
                        "userId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project or organization member not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Project deletion is pending",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "userId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "project:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "project_admin",
                      "project_member",
                      "project_viewer"
                    ]
                  }
                },
                "required": [
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/project/archive": {
      "post": {
        "tags": [
          "public",
          "projects"
        ],
        "summary": "Archive a project",
        "description": "Organization owners and admins can change archive state. This operation preserves project data and does not schedule deletion or recover pending deletion.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_project_archive",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Project archived",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "changed": {
                          "type": "boolean"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "changed",
                        "isArchived",
                        "projectId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Project deletion is pending",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "project:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/project/deletion-preview": {
      "get": {
        "tags": [
          "public",
          "projects",
          "deletion"
        ],
        "summary": "Preview archive-state project deletion",
        "description": "Previews archive-state project deletion with its dependency impact and recovery window. Recovery restores archive state only and does not replay accepted telemetry.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_project_deletion_preview",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded project deletion preview",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "blockers": {
                          "maxItems": 1,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "const": "service_account_last_binding"
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 10000
                              }
                            },
                            "required": [
                              "code",
                              "count"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "counts": {
                          "type": "object",
                          "properties": {
                            "apiKeys": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "ingestCredentials": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "integrations": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "serviceAccountBindings": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10000
                            },
                            "traces": {
                              "type": "object",
                              "properties": {
                                "capped": {
                                  "type": "boolean"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 10000
                                }
                              },
                              "required": [
                                "capped",
                                "count"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "apiKeys",
                            "ingestCredentials",
                            "integrations",
                            "serviceAccountBindings",
                            "traces"
                          ],
                          "additionalProperties": false
                        },
                        "digest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "expiresAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "blockers",
                        "counts",
                        "digest",
                        "expiresAt",
                        "projectId",
                        "projectName"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "project:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/project/unarchive": {
      "post": {
        "tags": [
          "public",
          "projects"
        ],
        "summary": "Restore an archived project",
        "description": "Organization owners and admins can change archive state. This operation preserves project data and does not schedule deletion or recover pending deletion.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_project_unarchive",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Project restored",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "changed": {
                          "type": "boolean"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "changed",
                        "isArchived",
                        "projectId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Project deletion is pending",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "project:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/projects": {
      "get": {
        "tags": [
          "public",
          "projects"
        ],
        "summary": "List projects",
        "description": "List or read public projects.\n\n**Auth:** Requires a service-account or OAuth access Bearer token; credential scope, current bindings or memberships, tenant ownership, and entitlement are enforced without x-project-id.",
        "operationId": "get_api_v1_public_projects",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded project page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "projects": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "isArchived": {
                                "type": "boolean"
                              },
                              "isDefault": {
                                "type": "boolean"
                              },
                              "name": {
                                "type": "string",
                                "maxLength": 255
                              },
                              "orgId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "tier": {
                                "type": "string",
                                "maxLength": 50
                              },
                              "timezone": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 50
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "access": {
                                "type": "object",
                                "properties": {
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "project_admin",
                                      "project_member",
                                      "project_viewer"
                                    ]
                                  }
                                },
                                "required": [
                                  "role"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "createdAt",
                              "id",
                              "isArchived",
                              "isDefault",
                              "name",
                              "orgId",
                              "tier",
                              "timezone",
                              "updatedAt",
                              "access"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "projects"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "context:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {
              "default": "false",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "includeArchived query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "organizationId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "organizationId query parameter"
          }
        ]
      }
    },
    "/api/v1/public/prompts": {
      "get": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "List managed prompt versions",
        "description": "List or read public prompts.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_prompts",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded prompt catalog page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "prompts": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "commitMessage": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 10000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "contentHash": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "displayName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "labels": {
                                "maxItems": 32,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 50
                                }
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "role": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 32
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "source": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 32
                              },
                              "tags": {
                                "maxItems": 128,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 64
                                }
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "version": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "commitMessage",
                              "contentHash",
                              "createdAt",
                              "displayName",
                              "id",
                              "labels",
                              "name",
                              "role",
                              "source",
                              "tags",
                              "updatedAt",
                              "version"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "prompts"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50
            },
            "description": "label query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "name query parameter"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "description": "source query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Create a prompt version",
        "description": "Create or trigger public prompts.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_prompts",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Prompt version created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "commitMessage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "displayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "labels": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 50
                          }
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "role": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        },
                        "tags": {
                          "maxItems": 128,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 64
                          }
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "commitMessage",
                        "contentHash",
                        "createdAt",
                        "displayName",
                        "id",
                        "labels",
                        "name",
                        "role",
                        "source",
                        "tags",
                        "updatedAt",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Prompt version conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "commitMessage": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  },
                  "config": {},
                  "content": {
                    "type": "string",
                    "maxLength": 61440
                  },
                  "displayName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "messages": {
                    "minItems": 1,
                    "maxItems": 1024,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "string",
                          "maxLength": 61440
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "system",
                            "user",
                            "assistant",
                            "tool"
                          ]
                        }
                      },
                      "required": [
                        "content",
                        "role"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  "tags": {
                    "default": [],
                    "maxItems": 32,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\r\\n]+$"
                    }
                  },
                  "variables": {}
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/prompts/{promptId}": {
      "delete": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Delete a prompt version",
        "description": "Delete public prompts.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_prompts_promptId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt version deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "promptId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "deleted",
                        "promptId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Active prompt cannot be deleted",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Get a prompt version",
        "description": "Fetch a specific public prompts.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_prompts_promptId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Managed prompt version",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "commitMessage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "displayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "labels": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 50
                          }
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "role": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        },
                        "tags": {
                          "maxItems": 128,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 64
                          }
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        "config": {},
                        "content": {
                          "type": "string",
                          "maxLength": 262144
                        },
                        "messages": {
                          "anyOf": [
                            {
                              "maxItems": 1024,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "content": {
                                    "type": "string",
                                    "maxLength": 262144
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "system",
                                      "user",
                                      "assistant",
                                      "tool"
                                    ]
                                  }
                                },
                                "required": [
                                  "content",
                                  "role"
                                ],
                                "additionalProperties": false
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "variables": {}
                      },
                      "required": [
                        "commitMessage",
                        "contentHash",
                        "createdAt",
                        "displayName",
                        "id",
                        "labels",
                        "name",
                        "role",
                        "source",
                        "tags",
                        "updatedAt",
                        "version",
                        "config",
                        "content",
                        "messages",
                        "variables"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Prompt exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/changelog": {
      "get": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "List prompt changelog events",
        "description": "Fetch a specific prompts changelog.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_prompts_promptId_changelog",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded prompt changelog page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "commitMessage": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 10000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "eventId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "fromPromptId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "label_assigned",
                                  "label_removed",
                                  "tag_added",
                                  "tag_removed",
                                  "version_created"
                                ]
                              },
                              "promptId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 64
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "version": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "commitMessage",
                              "createdAt",
                              "eventId",
                              "fromPromptId",
                              "kind",
                              "promptId",
                              "value",
                              "version"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "promptId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "promptName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "events",
                        "page",
                        "promptId",
                        "promptName"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/comments": {
      "get": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "List prompt comments",
        "description": "Fetch a specific prompts comments.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_prompts_promptId_comments",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded prompt comment page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "comments": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authorDisplayName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "commentId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "content": {
                                "type": "string",
                                "maxLength": 10000
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "editableByCaller": {
                                "type": "boolean"
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "authorDisplayName",
                              "commentId",
                              "content",
                              "createdAt",
                              "editableByCaller",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 20
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "promptId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "comments",
                        "page",
                        "promptId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 20
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Create a prompt comment",
        "description": "Create or trigger prompts comments.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_prompts_promptId_comments",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Prompt comment created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorDisplayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "commentId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 10000
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "editableByCaller": {
                          "type": "boolean"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "authorDisplayName",
                        "commentId",
                        "content",
                        "createdAt",
                        "editableByCaller",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                },
                "required": [
                  "content"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/comments/{commentId}": {
      "delete": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Delete an owned prompt comment",
        "description": "Delete prompts comments.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_prompts_promptId_comments_commentId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt comment deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "commentId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "commentId",
                        "deleted"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt comment not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "commentId path parameter"
          },
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Update an owned prompt comment",
        "description": "Partially update prompts comments.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_prompts_promptId_comments_commentId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt comment updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorDisplayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "commentId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 10000
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "editableByCaller": {
                          "type": "boolean"
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "authorDisplayName",
                        "commentId",
                        "content",
                        "createdAt",
                        "editableByCaller",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt comment not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "commentId path parameter"
          },
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000
                  }
                },
                "required": [
                  "content"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/diff/{toPromptId}": {
      "get": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Compare two prompt versions",
        "description": "Fetch a specific prompts diff.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_prompts_promptId_diff_toPromptId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt version diff",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "changes": {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "enum": [
                                  "commitMessage",
                                  "config",
                                  "content",
                                  "displayName",
                                  "labels",
                                  "messages",
                                  "role",
                                  "source",
                                  "tags",
                                  "variables"
                                ]
                              },
                              "from": {},
                              "to": {}
                            },
                            "required": [
                              "field",
                              "from",
                              "to"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "from": {
                          "type": "object",
                          "properties": {
                            "commitMessage": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 10000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "contentHash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "displayName": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "labels": {
                              "maxItems": 32,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 50
                              }
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "role": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 32
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 32
                            },
                            "tags": {
                              "maxItems": 128,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 64
                              }
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "config": {},
                            "content": {
                              "type": "string",
                              "maxLength": 262144
                            },
                            "messages": {
                              "anyOf": [
                                {
                                  "maxItems": 1024,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "content": {
                                        "type": "string",
                                        "maxLength": 262144
                                      },
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "user",
                                          "assistant",
                                          "tool"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "content",
                                      "role"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "variables": {}
                          },
                          "required": [
                            "commitMessage",
                            "contentHash",
                            "createdAt",
                            "displayName",
                            "id",
                            "labels",
                            "name",
                            "role",
                            "source",
                            "tags",
                            "updatedAt",
                            "version",
                            "config",
                            "content",
                            "messages",
                            "variables"
                          ],
                          "additionalProperties": false
                        },
                        "to": {
                          "type": "object",
                          "properties": {
                            "commitMessage": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 10000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "contentHash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "displayName": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "labels": {
                              "maxItems": 32,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 50
                              }
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "role": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 32
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "source": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 32
                            },
                            "tags": {
                              "maxItems": 128,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 64
                              }
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "config": {},
                            "content": {
                              "type": "string",
                              "maxLength": 262144
                            },
                            "messages": {
                              "anyOf": [
                                {
                                  "maxItems": 1024,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "content": {
                                        "type": "string",
                                        "maxLength": 262144
                                      },
                                      "role": {
                                        "type": "string",
                                        "enum": [
                                          "system",
                                          "user",
                                          "assistant",
                                          "tool"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "content",
                                      "role"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "variables": {}
                          },
                          "required": [
                            "commitMessage",
                            "contentHash",
                            "createdAt",
                            "displayName",
                            "id",
                            "labels",
                            "name",
                            "role",
                            "source",
                            "tags",
                            "updatedAt",
                            "version",
                            "config",
                            "content",
                            "messages",
                            "variables"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "changes",
                        "from",
                        "to"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt versions not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Prompt diff exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "toPromptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "toPromptId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/history": {
      "get": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "List prompt version history",
        "description": "Fetch a specific prompts history.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_prompts_promptId_history",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded prompt version history",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "promptName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "versions": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "commitMessage": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 10000
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "contentHash": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "displayName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "labels": {
                                "maxItems": 32,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 50
                                }
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "role": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 32
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "source": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 32
                              },
                              "tags": {
                                "maxItems": 128,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "maxLength": 64
                                }
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicUtcTimestamp"
                              },
                              "version": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "commitMessage",
                              "contentHash",
                              "createdAt",
                              "displayName",
                              "id",
                              "labels",
                              "name",
                              "role",
                              "source",
                              "tags",
                              "updatedAt",
                              "version"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "promptName",
                        "versions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/label": {
      "put": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Activate a prompt label",
        "description": "Replace/update prompts label.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "put_api_v1_public_prompts_promptId_label",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt label activated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "commitMessage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "displayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "labels": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 50
                          }
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "role": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        },
                        "tags": {
                          "maxItems": 128,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 64
                          }
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "commitMessage",
                        "contentHash",
                        "createdAt",
                        "displayName",
                        "id",
                        "labels",
                        "name",
                        "role",
                        "source",
                        "tags",
                        "updatedAt",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  }
                },
                "required": [
                  "label"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/labels": {
      "get": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "List prompt labels",
        "description": "Fetch a specific prompts labels.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_prompts_promptId_labels",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt labels",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "labels": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 50
                          }
                        },
                        "promptId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "labels",
                        "promptId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/labels/{label}": {
      "delete": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Remove a prompt label",
        "description": "Delete prompts labels.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_prompts_promptId_labels_label",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt label removed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "commitMessage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "displayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "labels": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 50
                          }
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "role": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        },
                        "tags": {
                          "maxItems": 128,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 64
                          }
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "commitMessage",
                        "contentHash",
                        "createdAt",
                        "displayName",
                        "id",
                        "labels",
                        "name",
                        "role",
                        "source",
                        "tags",
                        "updatedAt",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "label",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50,
              "pattern": "^[A-Za-z0-9_-]+$"
            },
            "description": "label path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/{promptId}/tags": {
      "delete": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Remove a prompt tag",
        "description": "Delete prompts tags.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_prompts_promptId_tags",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt tag removed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "commitMessage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "displayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "labels": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 50
                          }
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "role": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        },
                        "tags": {
                          "maxItems": 128,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 64
                          }
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "commitMessage",
                        "contentHash",
                        "createdAt",
                        "displayName",
                        "id",
                        "labels",
                        "name",
                        "role",
                        "source",
                        "tags",
                        "updatedAt",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tag": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\r\\n]+$"
                  }
                },
                "required": [
                  "tag"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "List prompt tags",
        "description": "Fetch a specific prompts tags.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_prompts_promptId_tags",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt tags",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "promptId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "tags": {
                          "maxItems": 128,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 64
                          }
                        }
                      },
                      "required": [
                        "promptId",
                        "tags"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Add a prompt tag",
        "description": "Create or trigger prompts tags.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_prompts_promptId_tags",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt tag added",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "commitMessage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentHash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "displayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "labels": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 50
                          }
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "role": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 32
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "source": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        },
                        "tags": {
                          "maxItems": 128,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 64
                          }
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "commitMessage",
                        "contentHash",
                        "createdAt",
                        "displayName",
                        "id",
                        "labels",
                        "name",
                        "role",
                        "source",
                        "tags",
                        "updatedAt",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "promptId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "promptId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tag": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\r\\n]+$"
                  }
                },
                "required": [
                  "tag"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/prompts/bulk/labels": {
      "post": {
        "tags": [
          "public",
          "prompts"
        ],
        "summary": "Activate prompt labels atomically",
        "description": "Create or trigger bulk labels.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_prompts_bulk_labels",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Prompt labels activated atomically",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "assignments": {
                          "minItems": 1,
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "changed": {
                                "type": "boolean"
                              },
                              "fromPromptId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50,
                                "pattern": "^[A-Za-z0-9_-]+$"
                              },
                              "prompt": {
                                "type": "object",
                                "properties": {
                                  "commitMessage": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 10000
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "contentHash": {
                                    "type": "string",
                                    "pattern": "^[a-f0-9]{64}$"
                                  },
                                  "createdAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "displayName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "labels": {
                                    "maxItems": 32,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "maxLength": 50
                                    }
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "role": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 32
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 32
                                  },
                                  "tags": {
                                    "maxItems": 128,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "maxLength": 64
                                    }
                                  },
                                  "updatedAt": {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  "version": {
                                    "type": "integer",
                                    "exclusiveMinimum": 0,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "commitMessage",
                                  "contentHash",
                                  "createdAt",
                                  "displayName",
                                  "id",
                                  "labels",
                                  "name",
                                  "role",
                                  "source",
                                  "tags",
                                  "updatedAt",
                                  "version"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "changed",
                              "fromPromptId",
                              "label",
                              "prompt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "assignments",
                        "schemaVersion"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Prompt not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Prompt label assignment conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Prompt label migration could not be applied",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assignments": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "promptId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "label",
                        "promptId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "assignments"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/saved-filters": {
      "get": {
        "tags": [
          "public",
          "saved-filters"
        ],
        "summary": "List saved filters",
        "description": "List or read public saved-filters.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_saved_filters",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded page of the current caller's saved filters",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSavedFilterListEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "saved-filters"
        ],
        "summary": "Create a saved filter",
        "description": "Create or trigger public saved-filters.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_saved_filters",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Saved filter created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Saved filter name conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSavedFilterCreateRequest"
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/saved-filters/{savedFilterId}": {
      "delete": {
        "tags": [
          "public",
          "saved-filters"
        ],
        "summary": "Delete a saved filter",
        "description": "Delete public saved-filters.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_saved_filters_savedFilterId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Saved filter deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "const": "deleted"
                        }
                      },
                      "required": [
                        "id",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Saved filter not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "savedFilterId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "savedFilterId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSavedFilterDeleteRequest"
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "saved-filters"
        ],
        "summary": "Get a saved filter",
        "description": "Fetch a specific public saved-filters.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_saved_filters_savedFilterId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Current caller's saved trace filter",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSavedFilterEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Saved filter not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "savedFilterId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "savedFilterId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required OAuth user project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "saved-filters"
        ],
        "summary": "Update a saved filter",
        "description": "Partially update public saved-filters.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_saved_filters_savedFilterId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Saved filter updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicUtcTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Saved filter not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Saved filter name conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "savedFilterId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "savedFilterId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSavedFilterUpdateRequest"
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/search/traces": {
      "post": {
        "tags": [
          "public",
          "traces",
          "search"
        ],
        "summary": "Search traces by keyword",
        "description": "Read a bounded trace-search snapshot using a JSON request body. This safe POST is side-effect-free and keeps search text out of URLs and access logs.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_search_traces",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded keyword trace search page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "keyword",
                            "semantic"
                          ]
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "results": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "matchedSpans": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "type": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 50
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "type"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "score": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "trace": {
                                "type": "object",
                                "properties": {
                                  "completedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "durationMs": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "finalizationStatus": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "pending",
                                          "finalized",
                                          "dlq"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "framework": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 50
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "ingestedAt": {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  "llmCallsCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "sessionId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "spansCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "startedAt": {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  "status": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "tags": {
                                    "maxItems": 10,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    }
                                  },
                                  "toolCallsCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "totalCostUsd": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000
                                  },
                                  "totalTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "traceName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "workflowName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "completedAt",
                                  "durationMs",
                                  "finalizationStatus",
                                  "framework",
                                  "ingestedAt",
                                  "llmCallsCount",
                                  "sessionId",
                                  "spansCount",
                                  "startedAt",
                                  "status",
                                  "tags",
                                  "toolCallsCount",
                                  "totalCostUsd",
                                  "totalTokens",
                                  "traceId",
                                  "traceName",
                                  "workflowName"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "matchedSpans",
                              "score",
                              "trace"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "mode",
                        "page",
                        "results",
                        "truncated"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "limit": {
                    "default": 20,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  },
                  "q": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 512
                  },
                  "sessionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "workflowName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "q"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/search/traces/semantic": {
      "post": {
        "tags": [
          "public",
          "traces",
          "search"
        ],
        "summary": "Search traces semantically",
        "description": "Read a bounded semantic trace-search snapshot using a JSON request body. This safe POST is side-effect-free and keeps search text out of URLs and access logs.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "post_api_v1_public_search_traces_semantic",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded semantic trace search page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "keyword",
                            "semantic"
                          ]
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "results": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "matchedSpans": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    "type": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 50
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "type"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "score": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "trace": {
                                "type": "object",
                                "properties": {
                                  "completedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "durationMs": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "finalizationStatus": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "pending",
                                          "finalized",
                                          "dlq"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "framework": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 50
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "ingestedAt": {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  "llmCallsCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "sessionId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "spansCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "startedAt": {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  "status": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "tags": {
                                    "maxItems": 10,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    }
                                  },
                                  "toolCallsCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "totalCostUsd": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000
                                  },
                                  "totalTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "traceName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "workflowName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "completedAt",
                                  "durationMs",
                                  "finalizationStatus",
                                  "framework",
                                  "ingestedAt",
                                  "llmCallsCount",
                                  "sessionId",
                                  "spansCount",
                                  "startedAt",
                                  "status",
                                  "tags",
                                  "toolCallsCount",
                                  "totalCostUsd",
                                  "totalTokens",
                                  "traceId",
                                  "traceName",
                                  "workflowName"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "matchedSpans",
                              "score",
                              "trace"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "mode",
                        "page",
                        "results",
                        "truncated"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                  },
                  "from": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "limit": {
                    "default": 20,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  },
                  "q": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 512
                  },
                  "sessionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "to": {
                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                  },
                  "workflowName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "q"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "always",
        "x-neatlogs-safe-read": true,
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/service-accounts/{serviceAccountId}": {
      "get": {
        "tags": [
          "public",
          "service-accounts"
        ],
        "summary": "Get service-account metadata",
        "description": "Fetch a specific public service-accounts.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_service_accounts_serviceAccountId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service-account metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "disabledAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "organizationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "disabled"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "disabledAt",
                        "id",
                        "name",
                        "organizationId",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "service-accounts"
        ],
        "summary": "Update service-account metadata",
        "description": "Partially update public service-accounts.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_service_accounts_serviceAccountId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service account updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "disabledAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "organizationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "disabled"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "disabledAt",
                        "id",
                        "name",
                        "organizationId",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 10000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/service-accounts/{serviceAccountId}/audit": {
      "get": {
        "tags": [
          "public",
          "service-accounts",
          "audit"
        ],
        "summary": "List service-account lifecycle audit events",
        "description": "Fetch a specific service-accounts audit.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_service_accounts_serviceAccountId_audit",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service-account lifecycle audit",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "action": {
                                "type": "string",
                                "enum": [
                                  "service_account.binding_created",
                                  "service_account.binding_deleted",
                                  "service_account.binding_role_updated",
                                  "service_account.created",
                                  "service_account.updated",
                                  "service_account.disabled",
                                  "service_account.token_minted",
                                  "service_account.token_revoked",
                                  "service_account.token_rotated"
                                ]
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "metadata": {
                                "type": "object",
                                "properties": {
                                  "bindingCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "expiresAt": {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  "predecessorTokenId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "scopeCount": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "serviceAccountId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "tokenId": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "resourceId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "resourceType": {
                                "type": "string",
                                "enum": [
                                  "service_account",
                                  "service_account_project_binding",
                                  "service_account_token"
                                ]
                              }
                            },
                            "required": [
                              "action",
                              "createdAt",
                              "id",
                              "metadata",
                              "resourceId",
                              "resourceType"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "events",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/service-accounts/{serviceAccountId}/bindings": {
      "get": {
        "tags": [
          "public",
          "service-accounts",
          "bindings"
        ],
        "summary": "List active service-account project bindings",
        "description": "Fetch a specific service-accounts bindings.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_service_accounts_serviceAccountId_bindings",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service-account project bindings",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "bindings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "projectId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "project_admin",
                                  "project_member",
                                  "project_viewer"
                                ]
                              },
                              "serviceAccountId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "status": {
                                "type": "string",
                                "const": "active"
                              }
                            },
                            "required": [
                              "createdAt",
                              "id",
                              "projectId",
                              "role",
                              "serviceAccountId",
                              "status"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "bindings",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "service-accounts",
          "bindings"
        ],
        "summary": "Create a service-account project binding",
        "description": "Create or trigger service-accounts bindings.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_service_accounts_serviceAccountId_bindings",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Service-account project binding created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "project_admin",
                            "project_member",
                            "project_viewer"
                          ]
                        },
                        "serviceAccountId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "const": "active"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "projectId",
                        "role",
                        "serviceAccountId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "$ref": "#/components/schemas/PublicUuid"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "project_admin",
                      "project_member",
                      "project_viewer"
                    ]
                  }
                },
                "required": [
                  "projectId",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/service-accounts/{serviceAccountId}/bindings/{bindingId}": {
      "delete": {
        "tags": [
          "public",
          "service-accounts",
          "bindings"
        ],
        "summary": "Remove a service-account project binding",
        "description": "Delete service-accounts bindings.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_service_accounts_serviceAccountId_bindings_bindingId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service-account project binding removed",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "revokedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "serviceAccountId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "const": "revoked"
                        }
                      },
                      "required": [
                        "id",
                        "projectId",
                        "revokedAt",
                        "serviceAccountId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "bindingId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "bindingId path parameter"
          },
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "public",
          "service-accounts",
          "bindings"
        ],
        "summary": "Update a service-account project binding role",
        "description": "Partially update service-accounts bindings.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_service_accounts_serviceAccountId_bindings_bindingId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service-account project binding role updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "projectId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "project_admin",
                            "project_member",
                            "project_viewer"
                          ]
                        },
                        "serviceAccountId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "const": "active"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "projectId",
                        "role",
                        "serviceAccountId",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "bindingId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "bindingId path parameter"
          },
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "project_admin",
                      "project_member",
                      "project_viewer"
                    ]
                  }
                },
                "required": [
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/service-accounts/{serviceAccountId}/disable": {
      "post": {
        "tags": [
          "public",
          "service-accounts"
        ],
        "summary": "Disable a service account",
        "description": "Create or trigger service-accounts disable.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_service_accounts_serviceAccountId_disable",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service account disabled",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 10000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "disabledAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "organizationId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "disabled"
                          ]
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "disabledAt",
                        "id",
                        "name",
                        "organizationId",
                        "status",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/service-accounts/{serviceAccountId}/tokens": {
      "get": {
        "tags": [
          "public",
          "service-accounts",
          "tokens"
        ],
        "summary": "List all service-account token metadata",
        "description": "Fetch a specific service-accounts tokens.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_service_accounts_serviceAccountId_tokens",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service-account token metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "tokens": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "expiresAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "lastFour": {
                                "type": "string",
                                "pattern": "^[A-Za-z0-9_-]{4}$"
                              },
                              "lastUsedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "prefix": {
                                "type": "string",
                                "pattern": "^nlsa_[A-Za-z0-9_-]{11}$"
                              },
                              "revokedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "rotatedFromTokenId": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scopes": {
                                "minItems": 1,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "context:read",
                                    "project:write",
                                    "observability:read",
                                    "observability:write",
                                    "evaluation:read",
                                    "evaluation:write",
                                    "configuration:read",
                                    "configuration:write",
                                    "sharing:read",
                                    "sharing:write",
                                    "access:read",
                                    "access:write"
                                  ]
                                },
                                "uniqueItems": true
                              },
                              "serviceAccountId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "expired",
                                  "revoked"
                                ]
                              }
                            },
                            "required": [
                              "createdAt",
                              "expiresAt",
                              "id",
                              "lastFour",
                              "lastUsedAt",
                              "name",
                              "prefix",
                              "revokedAt",
                              "rotatedFromTokenId",
                              "scopes",
                              "serviceAccountId",
                              "state"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "tokens"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "service-accounts"
        ],
        "summary": "Mint a service-account token",
        "description": "Create or trigger service-accounts tokens.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_service_accounts_serviceAccountId_tokens",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Service-account token minted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_service_accounts_serviceAccountId_tokens"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "type": "null"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "operationId",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "minLength": 22,
                          "maxLength": 22,
                          "pattern": "^[A-Za-z0-9_-]{21}[AQgw]$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-][AQgw]|[A-Za-z0-9_-]{2}[AEIMQUYcgkosw048])?$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "minLength": 16,
                          "maxLength": 16,
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API idempotency conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "serviceAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "serviceAccountId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 43,
              "maxLength": 43,
              "allOf": [
                {
                  "pattern": "^[A-Za-z0-9_-]{43}$"
                },
                {
                  "pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
                }
              ],
              "writeOnly": true,
              "description": "Required 32-byte unpadded base64url secret replay key"
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresInDays": {
                    "default": 90,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  },
                  "scopes": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "context:read",
                        "project:write",
                        "observability:read",
                        "observability:write",
                        "evaluation:read",
                        "evaluation:write",
                        "configuration:read",
                        "configuration:write",
                        "sharing:read",
                        "sharing:write",
                        "access:read",
                        "access:write"
                      ]
                    },
                    "uniqueItems": true
                  }
                },
                "required": [
                  "name",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "service-account-token-mint",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/sessions": {
      "get": {
        "tags": [
          "public",
          "sessions"
        ],
        "summary": "List sessions",
        "description": "List or read public sessions.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_sessions",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded session page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "sessions": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "durationMs": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "framework": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 50
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "lastActivityAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "llmCallsCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "sessionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "spansCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "startedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20
                              },
                              "toolCallsCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "totalCostUsd": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000
                              },
                              "totalTokens": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "traceName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "workflowName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "durationMs",
                              "framework",
                              "lastActivityAt",
                              "llmCallsCount",
                              "sessionId",
                              "spansCount",
                              "startedAt",
                              "status",
                              "toolCallsCount",
                              "totalCostUsd",
                              "totalTokens",
                              "traceCount",
                              "traceName",
                              "workflowName"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "sessions"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicOffsetTimestamp"
            },
            "description": "from query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "description": "status query parameter"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicOffsetTimestamp"
            },
            "description": "to query parameter"
          },
          {
            "name": "workflowName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "workflowName query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/sessions/{sessionId}": {
      "get": {
        "tags": [
          "public",
          "sessions"
        ],
        "summary": "Get a session",
        "description": "Fetch a specific public sessions.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_sessions_sessionId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Session metadata and trace page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "session": {
                          "type": "object",
                          "properties": {
                            "durationMs": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "framework": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 50
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "lastActivityAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "llmCallsCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "sessionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "spansCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "startedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "status": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 20
                            },
                            "toolCallsCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "totalCostUsd": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1000000000000
                            },
                            "totalTokens": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "traceCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "traceName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "workflowName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            }
                          },
                          "required": [
                            "durationMs",
                            "framework",
                            "lastActivityAt",
                            "llmCallsCount",
                            "sessionId",
                            "spansCount",
                            "startedAt",
                            "status",
                            "toolCallsCount",
                            "totalCostUsd",
                            "totalTokens",
                            "traceCount",
                            "traceName",
                            "workflowName"
                          ],
                          "additionalProperties": false
                        },
                        "traces": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "completedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "durationMs": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "finalizationStatus": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "pending",
                                      "finalized",
                                      "dlq"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "framework": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 50
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "ingestedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "llmCallsCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "sessionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "spansCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "startedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20
                              },
                              "tags": {
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                }
                              },
                              "toolCallsCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "totalCostUsd": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000
                              },
                              "totalTokens": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "traceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "traceName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "workflowName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "completedAt",
                              "durationMs",
                              "finalizationStatus",
                              "framework",
                              "ingestedAt",
                              "llmCallsCount",
                              "sessionId",
                              "spansCount",
                              "startedAt",
                              "status",
                              "tags",
                              "toolCallsCount",
                              "totalCostUsd",
                              "totalTokens",
                              "traceId",
                              "traceName",
                              "workflowName"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "session",
                        "traces"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "sessionId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/sessions/{sessionId}/export": {
      "get": {
        "tags": [
          "public",
          "sessions"
        ],
        "summary": "Export a session",
        "description": "Fetch a specific sessions export.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_sessions_sessionId_export",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded safe session export in JSON, Markdown, or CSV",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "session": {
                              "type": "object",
                              "properties": {
                                "durationMs": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "framework": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 50
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "lastActivityAt": {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                "llmCallsCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "sessionId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "spansCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "startedAt": {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                "status": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 20
                                },
                                "toolCallsCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "totalCostUsd": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1000000000000
                                },
                                "totalTokens": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "traceCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "traceName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "workflowName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                }
                              },
                              "required": [
                                "durationMs",
                                "framework",
                                "lastActivityAt",
                                "llmCallsCount",
                                "sessionId",
                                "spansCount",
                                "startedAt",
                                "status",
                                "toolCallsCount",
                                "totalCostUsd",
                                "totalTokens",
                                "traceCount",
                                "traceName",
                                "workflowName"
                              ],
                              "additionalProperties": false
                            },
                            "turns": {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "exportStatus": {
                                    "type": "string",
                                    "enum": [
                                      "available",
                                      "processing",
                                      "failed"
                                    ]
                                  },
                                  "index": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 50
                                  },
                                  "spans": {
                                    "maxItems": 500,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "completionTokens": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "costUsd": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 1000000000000
                                        },
                                        "durationMs": {
                                          "type": "number",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "endedAt": {
                                          "anyOf": [
                                            {
                                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "model": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "maxLength": 255
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "parentSpanId": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 128
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "promptTokens": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "provider": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "maxLength": 100
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "spanId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 128
                                        },
                                        "spanName": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 255
                                        },
                                        "spanType": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 50
                                        },
                                        "startedAt": {
                                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                        },
                                        "status": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 20
                                        },
                                        "totalTokens": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 9007199254740991
                                        },
                                        "traceId": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 255
                                        }
                                      },
                                      "required": [
                                        "completionTokens",
                                        "costUsd",
                                        "durationMs",
                                        "endedAt",
                                        "model",
                                        "parentSpanId",
                                        "promptTokens",
                                        "provider",
                                        "spanId",
                                        "spanName",
                                        "spanType",
                                        "startedAt",
                                        "status",
                                        "totalTokens",
                                        "traceId"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "trace": {
                                    "type": "object",
                                    "properties": {
                                      "completedAt": {
                                        "anyOf": [
                                          {
                                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "durationMs": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "finalizationStatus": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "pending",
                                              "finalized",
                                              "dlq"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "framework": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "maxLength": 50
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "ingestedAt": {
                                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                      },
                                      "llmCallsCount": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "sessionId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "spansCount": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "startedAt": {
                                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                      },
                                      "status": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 20
                                      },
                                      "tags": {
                                        "maxItems": 10,
                                        "type": "array",
                                        "items": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 128
                                        }
                                      },
                                      "toolCallsCount": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "totalCostUsd": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1000000000000
                                      },
                                      "totalTokens": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "traceId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "traceName": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 255
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "workflowName": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 255
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "completedAt",
                                      "durationMs",
                                      "finalizationStatus",
                                      "framework",
                                      "ingestedAt",
                                      "llmCallsCount",
                                      "sessionId",
                                      "spansCount",
                                      "startedAt",
                                      "status",
                                      "tags",
                                      "toolCallsCount",
                                      "totalCostUsd",
                                      "totalTokens",
                                      "traceId",
                                      "traceName",
                                      "workflowName"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "exportStatus",
                                  "index",
                                  "spans",
                                  "trace"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "schemaVersion",
                            "session",
                            "turns"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "type": "string"
                            },
                            "filename": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "format": {
                              "type": "string",
                              "enum": [
                                "markdown",
                                "csv"
                              ]
                            },
                            "mediaType": {
                              "type": "string",
                              "enum": [
                                "text/markdown",
                                "text/csv"
                              ]
                            },
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "content",
                            "filename",
                            "format",
                            "mediaType",
                            "schemaVersion"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Session export exceeds the public response budget",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "sessionId path parameter"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "default": "json",
              "type": "string",
              "enum": [
                "json",
                "markdown",
                "csv"
              ]
            },
            "description": "format query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/skills": {
      "get": {
        "tags": [
          "public",
          "skills",
          "configuration"
        ],
        "summary": "List evaluator skills",
        "description": "List or read public skills.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_skills",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator skills",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "skills": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "description": {
                                "type": "string",
                                "maxLength": 1024
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "isArchived": {
                                "type": "boolean"
                              },
                              "kind": {
                                "type": "string",
                                "const": "evaluator"
                              },
                              "latestVersion": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "createdAt": {
                                        "anyOf": [
                                          {
                                            "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "id": {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "exclusiveMinimum": 0,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "createdAt",
                                      "id",
                                      "version"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "updatedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "versionCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "createdAt",
                              "description",
                              "id",
                              "isArchived",
                              "kind",
                              "latestVersion",
                              "name",
                              "updatedAt",
                              "versionCount"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "skills"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored skill page exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {
              "default": "false",
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "includeArchived query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "skills",
          "configuration"
        ],
        "summary": "Import a local evaluator skill",
        "description": "Create or trigger public skills.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_skills",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Evaluator skill imported",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 1024
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "kind": {
                          "type": "string",
                          "const": "evaluator"
                        },
                        "latestVersion": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "createdAt": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "version": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "createdAt",
                                "id",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "versionCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "id",
                        "isArchived",
                        "kind",
                        "latestVersion",
                        "name",
                        "updatedAt",
                        "versionCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Skill name conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "markdown": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 104096
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[a-z0-9-]+$"
                  }
                },
                "required": [
                  "markdown"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/skills/{skillId}": {
      "delete": {
        "tags": [
          "public",
          "skills",
          "configuration"
        ],
        "summary": "Delete an evaluator skill",
        "description": "Delete public skills.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_skills_skillId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Skill deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "skillId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "deleted",
                        "skillId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Skill not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Skill is in use",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "skillId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "skillId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "skills",
          "configuration"
        ],
        "summary": "Get an evaluator skill",
        "description": "Fetch a specific public skills.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_skills_skillId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator skill",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 1024
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "kind": {
                          "type": "string",
                          "const": "evaluator"
                        },
                        "latestVersion": {
                          "type": "object",
                          "properties": {
                            "createdAt": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "id": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 9007199254740991
                            },
                            "body": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100000
                            },
                            "contextFileCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 10
                            },
                            "suggestedQuestions": {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "text": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1000
                                  },
                                  "answerType": {
                                    "type": "string",
                                    "maxLength": 40
                                  },
                                  "options": {
                                    "maxItems": 50,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "maxLength": 200
                                    }
                                  }
                                },
                                "required": [
                                  "text"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "whenToUse": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "createdAt",
                            "id",
                            "version",
                            "body",
                            "contextFileCount",
                            "suggestedQuestions",
                            "whenToUse"
                          ],
                          "additionalProperties": false
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "versionCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "id",
                        "isArchived",
                        "kind",
                        "latestVersion",
                        "name",
                        "updatedAt",
                        "versionCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Skill not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Stored skill exceeds response limits",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "skillId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "skillId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "skills",
          "configuration"
        ],
        "summary": "Update an evaluator skill",
        "description": "Partially update public skills.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_skills_skillId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Evaluator skill updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 1024
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "kind": {
                          "type": "string",
                          "const": "evaluator"
                        },
                        "latestVersion": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "createdAt": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "version": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "createdAt",
                                "id",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "versionCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "id",
                        "isArchived",
                        "kind",
                        "latestVersion",
                        "name",
                        "updatedAt",
                        "versionCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Skill not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "skillId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "skillId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 1024
                  },
                  "isArchived": {
                    "type": "boolean"
                  },
                  "version": {
                    "type": "object",
                    "properties": {
                      "body": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100000
                      },
                      "suggestedQuestions": {
                        "default": [],
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            "answerType": {
                              "type": "string",
                              "maxLength": 40
                            },
                            "options": {
                              "maxItems": 50,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 200
                              }
                            }
                          },
                          "required": [
                            "text"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "whenToUse": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 1024
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/skills/imports/github": {
      "post": {
        "tags": [
          "public",
          "skills",
          "configuration"
        ],
        "summary": "Import an immutable evaluator skill from GitHub",
        "description": "Create or trigger imports github.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_skills_imports_github",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Evaluator skill imported from GitHub",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 1024
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "kind": {
                          "type": "string",
                          "const": "evaluator"
                        },
                        "latestVersion": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "createdAt": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "version": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "createdAt",
                                "id",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "versionCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "createdAt",
                        "description",
                        "id",
                        "isArchived",
                        "kind",
                        "latestVersion",
                        "name",
                        "updatedAt",
                        "versionCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Skill name conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Remote skill content is invalid",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "minLength": 8
                  },
                  "ref": {
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{40}$"
                  },
                  "repository": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 140
                  },
                  "source": {
                    "type": "string",
                    "const": "github"
                  }
                },
                "required": [
                  "path",
                  "ref",
                  "repository",
                  "source"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/tokens/{tokenId}": {
      "delete": {
        "tags": [
          "public",
          "service-accounts",
          "tokens"
        ],
        "summary": "Revoke a service-account token",
        "description": "Delete public tokens.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_tokens_tokenId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Service-account token revoked",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "expiresAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "lastFour": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_-]{4}$"
                        },
                        "lastUsedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "prefix": {
                          "type": "string",
                          "pattern": "^nlsa_[A-Za-z0-9_-]{11}$"
                        },
                        "revokedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "rotatedFromTokenId": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "context:read",
                              "project:write",
                              "observability:read",
                              "observability:write",
                              "evaluation:read",
                              "evaluation:write",
                              "configuration:read",
                              "configuration:write",
                              "sharing:read",
                              "sharing:write",
                              "access:read",
                              "access:write"
                            ]
                          },
                          "uniqueItems": true
                        },
                        "serviceAccountId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "expired",
                            "revoked"
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "expiresAt",
                        "id",
                        "lastFour",
                        "lastUsedAt",
                        "name",
                        "prefix",
                        "revokedAt",
                        "rotatedFromTokenId",
                        "scopes",
                        "serviceAccountId",
                        "state"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "tokenId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/v1/public/tokens/{tokenId}/rotate": {
      "post": {
        "tags": [
          "public",
          "service-accounts",
          "tokens"
        ],
        "summary": "Rotate a service-account token",
        "description": "Create or trigger tokens rotate.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_tokens_tokenId_rotate",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Service-account token rotated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "aad": {
                          "type": "object",
                          "properties": {
                            "actorId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "actorKind": {
                              "type": "string",
                              "const": "user"
                            },
                            "environment": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9._-]{1,128}$"
                            },
                            "idempotencyKeyDigest": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "operationId": {
                              "type": "string",
                              "const": "post_api_v1_public_tokens_tokenId_rotate"
                            },
                            "orgId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "projectId": {
                              "type": "null"
                            },
                            "recordId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "requestFingerprint": {
                              "type": "object",
                              "properties": {
                                "digest": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "keyId": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_-]{1,32}$"
                                },
                                "version": {
                                  "type": "number",
                                  "const": 1
                                }
                              },
                              "required": [
                                "digest",
                                "keyId",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            "response": {
                              "type": "object",
                              "properties": {
                                "contentType": {
                                  "type": "string",
                                  "const": "application/json"
                                },
                                "schemaVersion": {
                                  "type": "number",
                                  "const": 1
                                },
                                "status": {
                                  "type": "number",
                                  "const": 201
                                }
                              },
                              "required": [
                                "contentType",
                                "schemaVersion",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "version": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "actorId",
                            "actorKind",
                            "environment",
                            "idempotencyKeyDigest",
                            "operationId",
                            "orgId",
                            "projectId",
                            "recordId",
                            "requestFingerprint",
                            "response",
                            "version"
                          ],
                          "additionalProperties": false
                        },
                        "algorithm": {
                          "type": "string",
                          "const": "A256GCM"
                        },
                        "authTag": {
                          "type": "string",
                          "minLength": 22,
                          "maxLength": 22,
                          "pattern": "^[A-Za-z0-9_-]{21}[AQgw]$"
                        },
                        "ciphertext": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 21846,
                          "pattern": "^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-][AQgw]|[A-Za-z0-9_-]{2}[AEIMQUYcgkosw048])?$"
                        },
                        "kind": {
                          "type": "string",
                          "const": "client_wrapped_secret"
                        },
                        "nonce": {
                          "type": "string",
                          "minLength": 16,
                          "maxLength": 16,
                          "pattern": "^[A-Za-z0-9_-]{16}$"
                        },
                        "version": {
                          "type": "number",
                          "const": 1
                        }
                      },
                      "required": [
                        "aad",
                        "algorithm",
                        "authTag",
                        "ciphertext",
                        "kind",
                        "nonce",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API rotation conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "tokenId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-neatlogs-secret-replay-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 43,
              "maxLength": 43,
              "allOf": [
                {
                  "pattern": "^[A-Za-z0-9_-]{43}$"
                },
                {
                  "pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
                }
              ],
              "writeOnly": true,
              "description": "Required 32-byte unpadded base64url secret replay key"
            },
            "description": "x-neatlogs-secret-replay-key header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "access:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresInDays": {
                    "default": 90,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "\\S"
                  },
                  "scopes": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "context:read",
                        "project:write",
                        "observability:read",
                        "observability:write",
                        "evaluation:read",
                        "evaluation:write",
                        "configuration:read",
                        "configuration:write",
                        "sharing:read",
                        "sharing:write",
                        "access:read",
                        "access:write"
                      ]
                    },
                    "uniqueItems": true
                  }
                },
                "required": [
                  "name",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "service-account-token-mint",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces": {
      "get": {
        "tags": [
          "public",
          "traces"
        ],
        "summary": "List traces",
        "description": "List or read public traces.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded trace page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "traces": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "completedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "durationMs": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "finalizationStatus": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "pending",
                                      "finalized",
                                      "dlq"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "framework": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 50
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "ingestedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "llmCallsCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "sessionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "spansCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "startedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20
                              },
                              "tags": {
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                }
                              },
                              "toolCallsCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "totalCostUsd": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000
                              },
                              "totalTokens": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "traceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "traceName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "workflowName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "completedAt",
                              "durationMs",
                              "finalizationStatus",
                              "framework",
                              "ingestedAt",
                              "llmCallsCount",
                              "sessionId",
                              "spansCount",
                              "startedAt",
                              "status",
                              "tags",
                              "toolCallsCount",
                              "totalCostUsd",
                              "totalTokens",
                              "traceId",
                              "traceName",
                              "workflowName"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "traces"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicOffsetTimestamp"
            },
            "description": "from query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "description": "status query parameter"
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicOffsetTimestamp"
            },
            "description": "to query parameter"
          },
          {
            "name": "workflowName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "workflowName query parameter"
          },
          {
            "name": "sessionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "sessionId query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/traces/{traceId}": {
      "delete": {
        "tags": [
          "public",
          "traces"
        ],
        "summary": "Soft-delete a trace",
        "description": "Delete public traces.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_traces_traceId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Trace catalog entry soft-deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deletedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "mode": {
                          "type": "string",
                          "const": "soft_delete"
                        },
                        "publicSharingRevoked": {
                          "type": "boolean",
                          "const": true
                        },
                        "state": {
                          "type": "string",
                          "const": "deleted"
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "deletedAt",
                        "mode",
                        "publicSharingRevoked",
                        "state",
                        "traceId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "tier-c-compute",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "traces"
        ],
        "summary": "Get a trace",
        "description": "Fetch a specific public traces.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Safe trace metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "durationMs": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "finalizationStatus": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "pending",
                                "finalized",
                                "dlq"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "framework": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "ingestedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "llmCallsCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "sessionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "spansCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "startedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "tags": {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          }
                        },
                        "toolCallsCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalCostUsd": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000000000
                        },
                        "totalTokens": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "traceName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "workflowName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metadataRevision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "metadataUpdatedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "completedAt",
                        "durationMs",
                        "finalizationStatus",
                        "framework",
                        "ingestedAt",
                        "llmCallsCount",
                        "sessionId",
                        "spansCount",
                        "startedAt",
                        "status",
                        "tags",
                        "toolCallsCount",
                        "totalCostUsd",
                        "totalTokens",
                        "traceId",
                        "traceName",
                        "workflowName",
                        "metadataRevision",
                        "metadataUpdatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "traces"
        ],
        "summary": "Update trace metadata",
        "description": "Partially update public traces.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_traces_traceId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Trace metadata updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "completedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "durationMs": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "finalizationStatus": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "pending",
                                "finalized",
                                "dlq"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "framework": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "ingestedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "llmCallsCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "sessionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "spansCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "startedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "tags": {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          }
                        },
                        "toolCallsCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalCostUsd": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000000000
                        },
                        "totalTokens": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "traceName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "workflowName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "metadataRevision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "metadataUpdatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "changedFields": {
                          "minItems": 1,
                          "maxItems": 2,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "tags",
                              "traceName"
                            ]
                          }
                        }
                      },
                      "required": [
                        "completedAt",
                        "durationMs",
                        "finalizationStatus",
                        "framework",
                        "ingestedAt",
                        "llmCallsCount",
                        "sessionId",
                        "spansCount",
                        "startedAt",
                        "status",
                        "tags",
                        "toolCallsCount",
                        "totalCostUsd",
                        "totalTokens",
                        "traceId",
                        "traceName",
                        "workflowName",
                        "metadataRevision",
                        "metadataUpdatedAt",
                        "changedFields"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace metadata revision conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "tags": {
                    "anyOf": [
                      {
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "traceName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "expectedRevision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/comment-threads": {
      "get": {
        "tags": [
          "public",
          "comments"
        ],
        "summary": "List trace comment threads",
        "description": "Fetch a specific traces comment-threads.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_comment_threads",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded comment-thread page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "threads": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authorDisplayName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "isResolved": {
                                "type": "boolean"
                              },
                              "lastMessageAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "messageCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "target": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  "itemKey": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "spanId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 128
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "spanName": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "trace",
                                      "agent",
                                      "span",
                                      "item"
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "itemKey",
                                  "spanId",
                                  "spanName",
                                  "type"
                                ],
                                "additionalProperties": false
                              },
                              "threadId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "traceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "authorDisplayName",
                              "createdAt",
                              "isResolved",
                              "lastMessageAt",
                              "messageCount",
                              "target",
                              "threadId",
                              "traceId",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "threads",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "resolved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "resolved query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/comment-threads/{threadId}": {
      "get": {
        "tags": [
          "public",
          "comments"
        ],
        "summary": "Get trace comment thread",
        "description": "Fetch a specific traces comment-threads.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_comment_threads_threadId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Comment thread with a bounded message page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "messages": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "authorDisplayName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "content": {
                                "type": "string"
                              },
                              "contentTruncated": {
                                "type": "boolean"
                              },
                              "context": {
                                "type": "object",
                                "properties": {
                                  "replyToMessageId": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "selectedSectionType": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 64
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "replyToMessageId",
                                  "selectedSectionType"
                                ],
                                "additionalProperties": false
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "messageId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "reactions": {
                                "maxItems": 32,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "count": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    },
                                    "emoji": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 64
                                    },
                                    "reactedByCaller": {
                                      "anyOf": [
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "count",
                                    "emoji",
                                    "reactedByCaller"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "authorDisplayName",
                              "content",
                              "contentTruncated",
                              "context",
                              "createdAt",
                              "messageId",
                              "reactions",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "thread": {
                          "type": "object",
                          "properties": {
                            "authorDisplayName": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "createdAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "isResolved": {
                              "type": "boolean"
                            },
                            "lastMessageAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            "messageCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "target": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "maxLength": 255
                                },
                                "itemKey": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "spanId": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 128
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "spanName": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "trace",
                                    "agent",
                                    "span",
                                    "item"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "itemKey",
                                "spanId",
                                "spanName",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            "threadId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "traceId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "updatedAt": {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            }
                          },
                          "required": [
                            "authorDisplayName",
                            "createdAt",
                            "isResolved",
                            "lastMessageAt",
                            "messageCount",
                            "target",
                            "threadId",
                            "traceId",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "messages",
                        "page",
                        "thread"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Comment thread not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "threadId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/comment-threads/{threadId}/messages": {
      "post": {
        "tags": [
          "public",
          "comments"
        ],
        "summary": "Create a trace comment",
        "description": "Create or trigger comment-threads messages.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_traces_traceId_comment_threads_threadId_messages",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Comment created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorDisplayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "content": {
                          "type": "string"
                        },
                        "contentTruncated": {
                          "type": "boolean"
                        },
                        "context": {
                          "type": "object",
                          "properties": {
                            "replyToMessageId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "selectedSectionType": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 64
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "replyToMessageId",
                            "selectedSectionType"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "messageId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reactions": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "count": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "emoji": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "reactedByCaller": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "count",
                              "emoji",
                              "reactedByCaller"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "authorDisplayName",
                        "content",
                        "contentTruncated",
                        "context",
                        "createdAt",
                        "messageId",
                        "reactions",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Comment thread not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "threadId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Non-empty comment text of at most 10000 UTF-8 bytes."
                  }
                },
                "required": [
                  "content"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/comment-threads/{threadId}/messages/{messageId}": {
      "delete": {
        "tags": [
          "public",
          "comments"
        ],
        "summary": "Delete an owned trace comment",
        "description": "Delete comment-threads messages.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_traces_traceId_comment_threads_threadId_messages_messageId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Comment deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "messageId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "deleted",
                        "messageId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "messageId path parameter"
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "threadId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "public",
          "comments"
        ],
        "summary": "Update an owned trace comment",
        "description": "Partially update comment-threads messages.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_traces_traceId_comment_threads_threadId_messages_messageId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Comment updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorDisplayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "content": {
                          "type": "string"
                        },
                        "contentTruncated": {
                          "type": "boolean"
                        },
                        "context": {
                          "type": "object",
                          "properties": {
                            "replyToMessageId": {
                              "anyOf": [
                                {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "selectedSectionType": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 64
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "replyToMessageId",
                            "selectedSectionType"
                          ],
                          "additionalProperties": false
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "messageId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "reactions": {
                          "maxItems": 32,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "count": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "emoji": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "reactedByCaller": {
                                "anyOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "count",
                              "emoji",
                              "reactedByCaller"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "authorDisplayName",
                        "content",
                        "contentTruncated",
                        "context",
                        "createdAt",
                        "messageId",
                        "reactions",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "messageId path parameter"
          },
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "threadId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Non-empty comment text of at most 10000 UTF-8 bytes."
                  }
                },
                "required": [
                  "content"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/evaluations": {
      "get": {
        "tags": [
          "public",
          "evaluations",
          "traces"
        ],
        "summary": "List evaluations associated with a trace",
        "description": "Fetch a specific traces evaluations.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_traces_traceId_evaluations",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded trace evaluation associations",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "associations": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "addedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicUtcTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "evaluation": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "$ref": "#/components/schemas/PublicUuid"
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "type": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 50
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "type"
                                ],
                                "additionalProperties": false
                              },
                              "itemId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              },
                              "target": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "itemId": {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      "itemType": {
                                        "type": "string",
                                        "const": "trace"
                                      },
                                      "parentTraceId": {
                                        "type": "null"
                                      },
                                      "spanId": {
                                        "type": "null"
                                      },
                                      "traceId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      }
                                    },
                                    "required": [
                                      "itemId",
                                      "itemType",
                                      "parentTraceId",
                                      "spanId",
                                      "traceId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "itemId": {
                                        "$ref": "#/components/schemas/PublicUuid"
                                      },
                                      "itemType": {
                                        "type": "string",
                                        "const": "span"
                                      },
                                      "parentTraceId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      },
                                      "spanId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "traceId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255
                                      }
                                    },
                                    "required": [
                                      "itemId",
                                      "itemType",
                                      "parentTraceId",
                                      "spanId",
                                      "traceId"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              }
                            },
                            "required": [
                              "addedAt",
                              "evaluation",
                              "itemId",
                              "status",
                              "target"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "associations",
                        "truncated"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "evaluation:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/export": {
      "get": {
        "tags": [
          "public",
          "traces"
        ],
        "summary": "Export a trace",
        "description": "Fetch a specific traces export.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_export",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded safe trace export in JSON, Markdown, or CSV",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "spans": {
                              "maxItems": 500,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "completionTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "costUsd": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1000000000000
                                  },
                                  "durationMs": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "endedAt": {
                                    "anyOf": [
                                      {
                                        "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "model": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "parentSpanId": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "promptTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "provider": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 100
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "spanId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "spanName": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "spanType": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 50
                                  },
                                  "startedAt": {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  "status": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "totalTokens": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "traceId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  }
                                },
                                "required": [
                                  "completionTokens",
                                  "costUsd",
                                  "durationMs",
                                  "endedAt",
                                  "model",
                                  "parentSpanId",
                                  "promptTokens",
                                  "provider",
                                  "spanId",
                                  "spanName",
                                  "spanType",
                                  "startedAt",
                                  "status",
                                  "totalTokens",
                                  "traceId"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "trace": {
                              "type": "object",
                              "properties": {
                                "completedAt": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "durationMs": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "finalizationStatus": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "pending",
                                        "finalized",
                                        "dlq"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "framework": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 50
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "ingestedAt": {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                "llmCallsCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "sessionId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "spansCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "startedAt": {
                                  "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                },
                                "status": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 20
                                },
                                "tags": {
                                  "maxItems": 10,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  }
                                },
                                "toolCallsCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "totalCostUsd": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1000000000000
                                },
                                "totalTokens": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 255
                                },
                                "traceName": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "workflowName": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "metadataRevision": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "metadataUpdatedAt": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "completedAt",
                                "durationMs",
                                "finalizationStatus",
                                "framework",
                                "ingestedAt",
                                "llmCallsCount",
                                "sessionId",
                                "spansCount",
                                "startedAt",
                                "status",
                                "tags",
                                "toolCallsCount",
                                "totalCostUsd",
                                "totalTokens",
                                "traceId",
                                "traceName",
                                "workflowName",
                                "metadataRevision",
                                "metadataUpdatedAt"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "schemaVersion",
                            "spans",
                            "trace"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content": {
                              "type": "string"
                            },
                            "filename": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 255
                            },
                            "format": {
                              "type": "string",
                              "enum": [
                                "markdown",
                                "csv"
                              ]
                            },
                            "mediaType": {
                              "type": "string",
                              "enum": [
                                "text/markdown",
                                "text/csv"
                              ]
                            },
                            "schemaVersion": {
                              "type": "number",
                              "const": 1
                            }
                          },
                          "required": [
                            "content",
                            "filename",
                            "format",
                            "mediaType",
                            "schemaVersion"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "422": {
            "description": "Trace export exceeds the public response budget",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem422"
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "default": "json",
              "type": "string",
              "enum": [
                "json",
                "markdown",
                "csv"
              ]
            },
            "description": "format query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/feedback": {
      "get": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "List trace feedback",
        "description": "Fetch a specific traces feedback.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_feedback",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded trace feedback page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "feedback": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "accuracy": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 50
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "authorDisplayName": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "comment": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "At most 32768 UTF-8 bytes."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "contentTruncated": {
                                "type": "boolean"
                              },
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "expectedResponse": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "description": "At most 65536 UTF-8 bytes."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "feedbackId": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "issueTypes": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                }
                              },
                              "rating": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -100,
                                    "maximum": 100
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "traceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "accuracy",
                              "authorDisplayName",
                              "comment",
                              "contentTruncated",
                              "createdAt",
                              "expectedResponse",
                              "feedbackId",
                              "issueTypes",
                              "rating",
                              "traceId",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "feedback",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "post": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "Create trace feedback",
        "description": "Create or trigger traces feedback.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_traces_traceId_feedback",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Trace feedback created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accuracy": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "authorDisplayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "comment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "At most 32768 UTF-8 bytes."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentTruncated": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "expectedResponse": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "At most 65536 UTF-8 bytes."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "feedbackId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "issueTypes": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "rating": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -100,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "accuracy",
                        "authorDisplayName",
                        "comment",
                        "contentTruncated",
                        "createdAt",
                        "expectedResponse",
                        "feedbackId",
                        "issueTypes",
                        "rating",
                        "traceId",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accuracy": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "comment": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "At most 16384 UTF-8 bytes."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedResponse": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "At most 32768 UTF-8 bytes."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "issueTypes": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "rating": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -100,
                        "maximum": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/feedback/{feedbackId}": {
      "delete": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "Delete owned trace feedback",
        "description": "Delete traces feedback.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_traces_traceId_feedback_feedbackId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Trace feedback deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "feedbackId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "deleted",
                        "feedbackId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Feedback not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "feedbackId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "feedbackId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "Get trace feedback",
        "description": "Fetch a specific traces feedback.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_feedback_feedbackId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Sanitized feedback",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accuracy": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "authorDisplayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "comment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "At most 32768 UTF-8 bytes."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentTruncated": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "expectedResponse": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "At most 65536 UTF-8 bytes."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "feedbackId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "issueTypes": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "rating": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -100,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "accuracy",
                        "authorDisplayName",
                        "comment",
                        "contentTruncated",
                        "createdAt",
                        "expectedResponse",
                        "feedbackId",
                        "issueTypes",
                        "rating",
                        "traceId",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Feedback not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "feedbackId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "feedbackId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "Update owned trace feedback",
        "description": "Partially update traces feedback.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_traces_traceId_feedback_feedbackId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Trace feedback updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accuracy": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 50
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "authorDisplayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "comment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "At most 32768 UTF-8 bytes."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "contentTruncated": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "expectedResponse": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "At most 65536 UTF-8 bytes."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "feedbackId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "issueTypes": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "rating": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -100,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "accuracy",
                        "authorDisplayName",
                        "comment",
                        "contentTruncated",
                        "createdAt",
                        "expectedResponse",
                        "feedbackId",
                        "issueTypes",
                        "rating",
                        "traceId",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Feedback not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "feedbackId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "feedbackId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accuracy": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 50
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "comment": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "At most 16384 UTF-8 bytes."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expectedResponse": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "At most 32768 UTF-8 bytes."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "issueTypes": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "rating": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -100,
                        "maximum": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/raw-spans": {
      "get": {
        "tags": [
          "public",
          "spans"
        ],
        "summary": "List raw span previews",
        "description": "Fetch a specific traces raw-spans.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_raw_spans",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded raw span previews",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "spans": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "durationMs": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "endedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "messagePreview": {
                                    "type": "string"
                                  },
                                  "truncated": {
                                    "type": "boolean"
                                  },
                                  "type": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "messagePreview",
                                  "truncated",
                                  "type"
                                ],
                                "additionalProperties": false
                              },
                              "input": {
                                "type": "object",
                                "properties": {
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "preview": {
                                    "type": "string"
                                  },
                                  "truncated": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "mimeType",
                                  "preview",
                                  "truncated"
                                ],
                                "additionalProperties": false
                              },
                              "output": {
                                "type": "object",
                                "properties": {
                                  "mimeType": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "maxLength": 255
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "preview": {
                                    "type": "string"
                                  },
                                  "truncated": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "mimeType",
                                  "preview",
                                  "truncated"
                                ],
                                "additionalProperties": false
                              },
                              "parentSpanId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "spanId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "spanName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "spanType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              },
                              "startedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20
                              },
                              "traceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "durationMs",
                              "endedAt",
                              "error",
                              "input",
                              "output",
                              "parentSpanId",
                              "spanId",
                              "spanName",
                              "spanType",
                              "startedAt",
                              "status",
                              "traceId"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "spans"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 25,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "description": "status query parameter"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50
            },
            "description": "type query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/sharing": {
      "get": {
        "tags": [
          "public",
          "sharing",
          "traces"
        ],
        "summary": "Get trace-sharing status",
        "description": "Fetch a specific traces sharing.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_traces_traceId_sharing",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted trace-sharing status",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicUtcTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "disabled",
                            "expired"
                          ]
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "enabled",
                        "expiresAt",
                        "state",
                        "traceId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "sharing:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/span-feedback": {
      "get": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "List trace span feedback",
        "description": "Fetch a specific traces span-feedback.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_span_feedback",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded span feedback page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "feedback": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "callerVote": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "enum": [
                                      "up",
                                      "down"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "downCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "spanId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "upCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "callerVote",
                              "downCount",
                              "spanId",
                              "upCount"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "feedback",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/spans": {
      "get": {
        "tags": [
          "public",
          "spans"
        ],
        "summary": "List trace spans",
        "description": "Fetch a specific traces spans.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_spans",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded safe span page",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 50
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        },
                        "spans": {
                          "maxItems": 50,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "completionTokens": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "costUsd": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1000000000000
                              },
                              "durationMs": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "endedAt": {
                                "anyOf": [
                                  {
                                    "$ref": "#/components/schemas/PublicOffsetTimestamp"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "model": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 255
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "parentSpanId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "promptTokens": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "provider": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 100
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "spanId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "spanName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "spanType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 50
                              },
                              "startedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "status": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 20
                              },
                              "totalTokens": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "traceId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              }
                            },
                            "required": [
                              "completionTokens",
                              "costUsd",
                              "durationMs",
                              "endedAt",
                              "model",
                              "parentSpanId",
                              "promptTokens",
                              "provider",
                              "spanId",
                              "spanName",
                              "spanType",
                              "startedAt",
                              "status",
                              "totalTokens",
                              "traceId"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "page",
                        "spans"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Trace not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "limit query parameter"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "description": "status query parameter"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50
            },
            "description": "type query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/spans/{spanId}": {
      "get": {
        "tags": [
          "public",
          "spans"
        ],
        "summary": "Get a trace span",
        "description": "Fetch a specific traces spans.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_spans_spanId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Safe span metadata",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "completionTokens": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "costUsd": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000000000
                        },
                        "durationMs": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "endedAt": {
                          "anyOf": [
                            {
                              "$ref": "#/components/schemas/PublicOffsetTimestamp"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "model": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 255
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "parentSpanId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "promptTokens": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "provider": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "spanName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "spanType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50
                        },
                        "startedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "status": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "totalTokens": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "completionTokens",
                        "costUsd",
                        "durationMs",
                        "endedAt",
                        "model",
                        "parentSpanId",
                        "promptTokens",
                        "provider",
                        "spanId",
                        "spanName",
                        "spanType",
                        "startedAt",
                        "status",
                        "totalTokens",
                        "traceId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Span not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "spanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "spanId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/spans/{spanId}/feedback": {
      "delete": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "Delete caller span feedback",
        "description": "Delete spans feedback.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_traces_traceId_spans_spanId_feedback",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Span feedback deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "callerVote": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "up",
                                "down"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "downCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "upCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "callerVote",
                        "downCount",
                        "spanId",
                        "upCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Span feedback not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "spanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "spanId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "Get trace span feedback",
        "description": "Fetch a specific spans feedback.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_spans_spanId_feedback",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Sanitized span feedback",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "callerVote": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "up",
                                "down"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "downCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "upCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "callerVote",
                        "downCount",
                        "spanId",
                        "upCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Span not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "spanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "spanId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "put": {
        "tags": [
          "public",
          "feedback"
        ],
        "summary": "Set caller span feedback",
        "description": "Replace/update spans feedback.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "put_api_v1_public_traces_traceId_spans_spanId_feedback",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Span feedback set",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "callerVote": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "up",
                                "down"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "downCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "upCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "callerVote",
                        "downCount",
                        "spanId",
                        "upCount"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Span not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "spanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "spanId path parameter"
          },
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "observability:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "At most 2048 UTF-8 bytes."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "vote": {
                    "type": "string",
                    "enum": [
                      "up",
                      "down"
                    ]
                  }
                },
                "required": [
                  "vote"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/traces/{traceId}/spans/{spanId}/payload": {
      "get": {
        "tags": [
          "public",
          "spans"
        ],
        "summary": "Get selected span payload fields",
        "description": "Fetch a specific spans payload.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_traces_traceId_spans_spanId_payload",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Selected span payload fields",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "fields": {
                          "type": "object",
                          "properties": {
                            "error": {
                              "type": "object",
                              "properties": {
                                "available": {
                                  "type": "boolean"
                                },
                                "mimeType": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "truncated": {
                                  "type": "boolean"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "available",
                                "mimeType",
                                "truncated",
                                "value"
                              ],
                              "additionalProperties": false
                            },
                            "input": {
                              "type": "object",
                              "properties": {
                                "available": {
                                  "type": "boolean"
                                },
                                "mimeType": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "truncated": {
                                  "type": "boolean"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "available",
                                "mimeType",
                                "truncated",
                                "value"
                              ],
                              "additionalProperties": false
                            },
                            "output": {
                              "type": "object",
                              "properties": {
                                "available": {
                                  "type": "boolean"
                                },
                                "mimeType": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 255
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "truncated": {
                                  "type": "boolean"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "available",
                                "mimeType",
                                "truncated",
                                "value"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      },
                      "required": [
                        "fields",
                        "spanId",
                        "traceId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Span payload not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Trace projection is not ready",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "traceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "traceId path parameter"
          },
          {
            "name": "spanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "spanId path parameter"
          },
          {
            "name": "fields",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "error",
                "input",
                "output",
                "error,input",
                "error,output",
                "input,error",
                "input,output",
                "output,error",
                "output,input",
                "error,input,output",
                "error,output,input",
                "input,error,output",
                "input,output,error",
                "output,error,input",
                "output,input,error"
              ]
            },
            "description": "fields query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "observability:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/webhooks": {
      "get": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "List redacted webhook configurations",
        "description": "List or read public webhooks.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_webhooks",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Bounded redacted webhook configurations",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "truncated": {
                          "type": "boolean"
                        },
                        "webhooks": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "createdAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "destinationConfigured": {
                                "type": "boolean"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "eventTypes": {
                                "maxItems": 64,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "*",
                                    "alert.anomaly_detected",
                                    "alert.compound_breach",
                                    "alert.ingestion_silent",
                                    "alert.metric_threshold_breach",
                                    "alert.per_event_match",
                                    "alert.sla_breach_warning",
                                    "alert.threshold_breach",
                                    "notification.action_items",
                                    "notification.approval_approved",
                                    "notification.approval_expired",
                                    "notification.approval_rejected",
                                    "notification.approval_requested",
                                    "notification.backfill_completed",
                                    "notification.classifier_trained",
                                    "notification.comment_created",
                                    "notification.daily_digest",
                                    "notification.experiment_significant",
                                    "notification.mention",
                                    "notification.prompt_version_changed",
                                    "notification.weekly_report",
                                    "notify.eval_assigned",
                                    "notify.eval_batch_deadline_passed",
                                    "notify.eval_batch_dispatched",
                                    "notify.eval_completed",
                                    "notify.eval_deadline_approaching",
                                    "notify.eval_deadline_passed",
                                    "notify.eval_reminder",
                                    "notify.eval_response_submitted",
                                    "ops.trace_finalizer_scaled"
                                  ]
                                }
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "updatedAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              }
                            },
                            "required": [
                              "createdAt",
                              "destinationConfigured",
                              "enabled",
                              "eventTypes",
                              "id",
                              "name",
                              "updatedAt"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "truncated",
                        "webhooks"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ]
      },
      "post": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "Create a webhook",
        "description": "Create or trigger public webhooks.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_webhooks",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "201": {
            "description": "Webhook created",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "destinationConfigured": {
                          "type": "boolean"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "eventTypes": {
                          "maxItems": 64,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "*",
                              "alert.anomaly_detected",
                              "alert.compound_breach",
                              "alert.ingestion_silent",
                              "alert.metric_threshold_breach",
                              "alert.per_event_match",
                              "alert.sla_breach_warning",
                              "alert.threshold_breach",
                              "notification.action_items",
                              "notification.approval_approved",
                              "notification.approval_expired",
                              "notification.approval_rejected",
                              "notification.approval_requested",
                              "notification.backfill_completed",
                              "notification.classifier_trained",
                              "notification.comment_created",
                              "notification.daily_digest",
                              "notification.experiment_significant",
                              "notification.mention",
                              "notification.prompt_version_changed",
                              "notification.weekly_report",
                              "notify.eval_assigned",
                              "notify.eval_batch_deadline_passed",
                              "notify.eval_batch_dispatched",
                              "notify.eval_completed",
                              "notify.eval_deadline_approaching",
                              "notify.eval_deadline_passed",
                              "notify.eval_reminder",
                              "notify.eval_response_submitted",
                              "ops.trace_finalizer_scaled"
                            ]
                          }
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "destinationConfigured",
                        "enabled",
                        "eventTypes",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Webhook conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "destinationUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "eventTypes": {
                    "minItems": 1,
                    "maxItems": 64,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "*",
                        "alert.anomaly_detected",
                        "alert.compound_breach",
                        "alert.ingestion_silent",
                        "alert.metric_threshold_breach",
                        "alert.per_event_match",
                        "alert.sla_breach_warning",
                        "alert.threshold_breach",
                        "notification.action_items",
                        "notification.approval_approved",
                        "notification.approval_expired",
                        "notification.approval_rejected",
                        "notification.approval_requested",
                        "notification.backfill_completed",
                        "notification.classifier_trained",
                        "notification.comment_created",
                        "notification.daily_digest",
                        "notification.experiment_significant",
                        "notification.mention",
                        "notification.prompt_version_changed",
                        "notification.weekly_report",
                        "notify.eval_assigned",
                        "notify.eval_batch_deadline_passed",
                        "notify.eval_batch_dispatched",
                        "notify.eval_completed",
                        "notify.eval_deadline_approaching",
                        "notify.eval_deadline_passed",
                        "notify.eval_reminder",
                        "notify.eval_response_submitted",
                        "ops.trace_finalizer_scaled"
                      ]
                    }
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "secret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "writeOnly": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "destinationUrl",
                  "eventTypes",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    },
    "/api/v1/public/webhooks/{webhookId}": {
      "delete": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "Delete a webhook",
        "description": "Delete public webhooks.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "delete_api_v1_public_webhooks_webhookId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Webhook deleted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "const": true
                        },
                        "webhookId": {
                          "$ref": "#/components/schemas/PublicUuid"
                        }
                      },
                      "required": [
                        "deleted",
                        "webhookId"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "webhookId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmation": {
                    "$ref": "#/components/schemas/PublicUuid"
                  }
                },
                "required": [
                  "confirmation"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "Get redacted webhook configuration",
        "description": "Fetch a specific public webhooks.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_webhooks_webhookId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted webhook configuration",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "destinationConfigured": {
                          "type": "boolean"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "eventTypes": {
                          "maxItems": 64,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "*",
                              "alert.anomaly_detected",
                              "alert.compound_breach",
                              "alert.ingestion_silent",
                              "alert.metric_threshold_breach",
                              "alert.per_event_match",
                              "alert.sla_breach_warning",
                              "alert.threshold_breach",
                              "notification.action_items",
                              "notification.approval_approved",
                              "notification.approval_expired",
                              "notification.approval_rejected",
                              "notification.approval_requested",
                              "notification.backfill_completed",
                              "notification.classifier_trained",
                              "notification.comment_created",
                              "notification.daily_digest",
                              "notification.experiment_significant",
                              "notification.mention",
                              "notification.prompt_version_changed",
                              "notification.weekly_report",
                              "notify.eval_assigned",
                              "notify.eval_batch_deadline_passed",
                              "notify.eval_batch_dispatched",
                              "notify.eval_completed",
                              "notify.eval_deadline_approaching",
                              "notify.eval_deadline_passed",
                              "notify.eval_reminder",
                              "notify.eval_response_submitted",
                              "ops.trace_finalizer_scaled"
                            ]
                          }
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "destinationConfigured",
                        "enabled",
                        "eventTypes",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "webhookId path parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      },
      "patch": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "Update a webhook",
        "description": "Partially update public webhooks.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "patch_api_v1_public_webhooks_webhookId",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Webhook updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "destinationConfigured": {
                          "type": "boolean"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "eventTypes": {
                          "maxItems": 64,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "*",
                              "alert.anomaly_detected",
                              "alert.compound_breach",
                              "alert.ingestion_silent",
                              "alert.metric_threshold_breach",
                              "alert.per_event_match",
                              "alert.sla_breach_warning",
                              "alert.threshold_breach",
                              "notification.action_items",
                              "notification.approval_approved",
                              "notification.approval_expired",
                              "notification.approval_rejected",
                              "notification.approval_requested",
                              "notification.backfill_completed",
                              "notification.classifier_trained",
                              "notification.comment_created",
                              "notification.daily_digest",
                              "notification.experiment_significant",
                              "notification.mention",
                              "notification.prompt_version_changed",
                              "notification.weekly_report",
                              "notify.eval_assigned",
                              "notify.eval_batch_deadline_passed",
                              "notify.eval_batch_dispatched",
                              "notify.eval_completed",
                              "notify.eval_deadline_approaching",
                              "notify.eval_deadline_passed",
                              "notify.eval_reminder",
                              "notify.eval_response_submitted",
                              "ops.trace_finalizer_scaled"
                            ]
                          }
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "destinationConfigured",
                        "enabled",
                        "eventTypes",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Webhook conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "webhookId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "destinationUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  "eventTypes": {
                    "minItems": 1,
                    "maxItems": 64,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "*",
                        "alert.anomaly_detected",
                        "alert.compound_breach",
                        "alert.ingestion_silent",
                        "alert.metric_threshold_breach",
                        "alert.per_event_match",
                        "alert.sla_breach_warning",
                        "alert.threshold_breach",
                        "notification.action_items",
                        "notification.approval_approved",
                        "notification.approval_expired",
                        "notification.approval_rejected",
                        "notification.approval_requested",
                        "notification.backfill_completed",
                        "notification.classifier_trained",
                        "notification.comment_created",
                        "notification.daily_digest",
                        "notification.experiment_significant",
                        "notification.mention",
                        "notification.prompt_version_changed",
                        "notification.weekly_report",
                        "notify.eval_assigned",
                        "notify.eval_batch_deadline_passed",
                        "notify.eval_batch_dispatched",
                        "notify.eval_completed",
                        "notify.eval_deadline_approaching",
                        "notify.eval_deadline_passed",
                        "notify.eval_reminder",
                        "notify.eval_response_submitted",
                        "ops.trace_finalizer_scaled"
                      ]
                    }
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "secret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "writeOnly": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/webhooks/{webhookId}/deliveries": {
      "get": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "List redacted webhook delivery history",
        "description": "Fetch a specific webhooks deliveries.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "get_api_v1_public_webhooks_webhookId_deliveries",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Redacted webhook delivery history",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deliveries": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "attempt": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              "deliveredAt": {
                                "$ref": "#/components/schemas/PublicOffsetTimestamp"
                              },
                              "eventType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "httpStatus": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "class": {
                                        "type": "string",
                                        "enum": [
                                          "1xx",
                                          "2xx",
                                          "3xx",
                                          "4xx",
                                          "5xx"
                                        ]
                                      },
                                      "code": {
                                        "type": "integer",
                                        "minimum": 100,
                                        "maximum": 599
                                      }
                                    },
                                    "required": [
                                      "class",
                                      "code"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "$ref": "#/components/schemas/PublicUuid"
                              },
                              "latencyMs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "outcome": {
                                "type": "string",
                                "enum": [
                                  "connection_failed",
                                  "failed",
                                  "succeeded"
                                ]
                              }
                            },
                            "required": [
                              "attempt",
                              "deliveredAt",
                              "eventType",
                              "httpStatus",
                              "id",
                              "latencyMs",
                              "outcome"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "page": {
                          "type": "object",
                          "properties": {
                            "hasMore": {
                              "type": "boolean"
                            },
                            "limit": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "nextCursor": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "hasMore",
                            "limit",
                            "nextCursor"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "deliveries",
                        "page"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "webhookId path parameter"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            "description": "cursor query parameter"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "limit query parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "Required service-account or OAuth project selection"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/webhooks/{webhookId}/deliveries/{deliveryId}/replay": {
      "post": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "Replay a stored webhook delivery",
        "description": "Create or trigger deliveries replay.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_webhooks_webhookId_deliveries_deliveryId_replay",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Webhook replay accepted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "accepted": {
                              "type": "boolean",
                              "const": true
                            },
                            "deliveryId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "kind": {
                              "type": "string",
                              "const": "test"
                            },
                            "webhookId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            }
                          },
                          "required": [
                            "accepted",
                            "deliveryId",
                            "kind",
                            "webhookId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "accepted": {
                              "type": "boolean",
                              "const": true
                            },
                            "deliveryId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "kind": {
                              "type": "string",
                              "const": "replay"
                            },
                            "sourceDeliveryId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "webhookId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            }
                          },
                          "required": [
                            "accepted",
                            "deliveryId",
                            "kind",
                            "sourceDeliveryId",
                            "webhookId"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Webhook delivery not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "deliveryId path parameter"
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "webhookId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/webhooks/{webhookId}/status": {
      "post": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "Set webhook state",
        "description": "Create or trigger webhooks status.\n\n**Auth:** Requires a service-account or OAuth access Bearer token and explicit x-project-id; credential scope, current project role, tenant ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_webhooks_webhookId_status",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Webhook state updated",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        },
                        "destinationConfigured": {
                          "type": "boolean"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "eventTypes": {
                          "maxItems": 64,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "*",
                              "alert.anomaly_detected",
                              "alert.compound_breach",
                              "alert.ingestion_silent",
                              "alert.metric_threshold_breach",
                              "alert.per_event_match",
                              "alert.sla_breach_warning",
                              "alert.threshold_breach",
                              "notification.action_items",
                              "notification.approval_approved",
                              "notification.approval_expired",
                              "notification.approval_rejected",
                              "notification.approval_requested",
                              "notification.backfill_completed",
                              "notification.classifier_trained",
                              "notification.comment_created",
                              "notification.daily_digest",
                              "notification.experiment_significant",
                              "notification.mention",
                              "notification.prompt_version_changed",
                              "notification.weekly_report",
                              "notify.eval_assigned",
                              "notify.eval_batch_deadline_passed",
                              "notify.eval_batch_dispatched",
                              "notify.eval_completed",
                              "notify.eval_deadline_approaching",
                              "notify.eval_deadline_passed",
                              "notify.eval_reminder",
                              "notify.eval_response_submitted",
                              "ops.trace_finalizer_scaled"
                            ]
                          }
                        },
                        "id": {
                          "$ref": "#/components/schemas/PublicUuid"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "updatedAt": {
                          "$ref": "#/components/schemas/PublicOffsetTimestamp"
                        }
                      },
                      "required": [
                        "createdAt",
                        "destinationConfigured",
                        "enabled",
                        "eventTypes",
                        "id",
                        "name",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "webhookId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/webhooks/{webhookId}/test": {
      "post": {
        "tags": [
          "public",
          "webhooks",
          "configuration"
        ],
        "summary": "Send a bounded test webhook",
        "description": "Create or trigger webhooks test.\n\n**Auth:** Requires an OAuth access Bearer token for a current NeatLogs user; current tenant RBAC, scope, resource ownership, and entitlement are enforced.",
        "operationId": "post_api_v1_public_webhooks_webhookId_test",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "202": {
            "description": "Webhook test accepted",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "accepted": {
                              "type": "boolean",
                              "const": true
                            },
                            "deliveryId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "kind": {
                              "type": "string",
                              "const": "test"
                            },
                            "webhookId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            }
                          },
                          "required": [
                            "accepted",
                            "deliveryId",
                            "kind",
                            "webhookId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "accepted": {
                              "type": "boolean",
                              "const": true
                            },
                            "deliveryId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "kind": {
                              "type": "string",
                              "const": "replay"
                            },
                            "sourceDeliveryId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            },
                            "webhookId": {
                              "$ref": "#/components/schemas/PublicUuid"
                            }
                          },
                          "required": [
                            "accepted",
                            "deliveryId",
                            "kind",
                            "sourceDeliveryId",
                            "webhookId"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "webhookId path parameter"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 22,
              "maxLength": 43,
              "pattern": "^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[A-Za-z0-9_-]{21}[AQgw]|[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048])$",
              "description": "Required canonical UUIDv4 or high-entropy base64url idempotency key"
            },
            "description": "idempotency-key header parameter"
          },
          {
            "name": "x-project-id",
            "in": "header",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PublicUuid"
            },
            "description": "x-project-id header parameter"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "configuration:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "x-neatlogs-operation-gate": "public-api-mutations",
        "x-contract-coverage": "contracted"
      }
    },
    "/api/v1/public/whoami": {
      "get": {
        "tags": [
          "public"
        ],
        "summary": "Get the authenticated Public API actor context",
        "description": "List or read public whoami.\n\n**Auth:** Requires a legacy project-bound public API key, service-account Bearer token, or OAuth access Bearer token; each credential follows its own carrier and authorization policy.",
        "operationId": "get_api_v1_public_whoami",
        "x-auth-gate": "public-api-key",
        "x-auth-source": "global-gate",
        "responses": {
          "200": {
            "description": "Authenticated actor and resolved authorization context",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "actor": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "kind": {
                                  "type": "string",
                                  "const": "legacy_public_api_key"
                                }
                              },
                              "required": [
                                "id",
                                "kind"
                              ],
                              "additionalProperties": false
                            },
                            "authorizationModelVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "context": {
                              "type": "object",
                              "properties": {
                                "authorization": {
                                  "type": "object",
                                  "properties": {
                                    "basis": {
                                      "type": "string",
                                      "const": "legacy_scope_binding"
                                    },
                                    "effectivePermissions": {
                                      "minItems": 1,
                                      "maxItems": 1,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "const": "project:read"
                                      }
                                    }
                                  },
                                  "required": [
                                    "basis",
                                    "effectivePermissions"
                                  ],
                                  "additionalProperties": false
                                },
                                "organizationId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "projectId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                }
                              },
                              "required": [
                                "authorization",
                                "organizationId",
                                "projectId"
                              ],
                              "additionalProperties": false
                            },
                            "credential": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "kind": {
                                  "type": "string",
                                  "const": "legacy_public_api_key"
                                },
                                "scopes": {
                                  "minItems": 1,
                                  "maxItems": 1,
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "const": "project:read"
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "kind",
                                "scopes"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "actor",
                            "authorizationModelVersion",
                            "context",
                            "credential"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "actor": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "kind": {
                                  "type": "string",
                                  "const": "service_account"
                                }
                              },
                              "required": [
                                "id",
                                "kind"
                              ],
                              "additionalProperties": false
                            },
                            "authorizationModelVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "context": {
                              "type": "object",
                              "properties": {
                                "authorization": {
                                  "type": "object",
                                  "properties": {
                                    "basis": {
                                      "type": "string",
                                      "const": "service_account_project_binding"
                                    },
                                    "effectivePermissions": {
                                      "minItems": 1,
                                      "maxItems": 1,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "const": "project:read"
                                      }
                                    }
                                  },
                                  "required": [
                                    "basis",
                                    "effectivePermissions"
                                  ],
                                  "additionalProperties": false
                                },
                                "organizationId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "projectId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                }
                              },
                              "required": [
                                "authorization",
                                "organizationId",
                                "projectId"
                              ],
                              "additionalProperties": false
                            },
                            "credential": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "kind": {
                                  "type": "string",
                                  "const": "service_account"
                                },
                                "scopes": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "context:read",
                                      "project:write",
                                      "observability:read",
                                      "observability:write",
                                      "evaluation:read",
                                      "evaluation:write",
                                      "configuration:read",
                                      "configuration:write",
                                      "sharing:read",
                                      "sharing:write",
                                      "access:read",
                                      "access:write"
                                    ]
                                  }
                                },
                                "serviceAccountId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                }
                              },
                              "required": [
                                "id",
                                "kind",
                                "scopes",
                                "serviceAccountId"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "actor",
                            "authorizationModelVersion",
                            "context",
                            "credential"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "actor": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "kind": {
                                  "type": "string",
                                  "const": "user"
                                }
                              },
                              "required": [
                                "id",
                                "kind"
                              ],
                              "additionalProperties": false
                            },
                            "authorizationModelVersion": {
                              "type": "number",
                              "const": 1
                            },
                            "context": {
                              "type": "object",
                              "properties": {
                                "authorization": {
                                  "type": "object",
                                  "properties": {
                                    "basis": {
                                      "type": "string",
                                      "const": "oauth_user_rbac"
                                    },
                                    "effectivePermissions": {
                                      "minItems": 1,
                                      "maxItems": 1,
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "const": "project:read"
                                      }
                                    }
                                  },
                                  "required": [
                                    "basis",
                                    "effectivePermissions"
                                  ],
                                  "additionalProperties": false
                                },
                                "organizationId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "projectId": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                }
                              },
                              "required": [
                                "authorization",
                                "organizationId",
                                "projectId"
                              ],
                              "additionalProperties": false
                            },
                            "credential": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/components/schemas/PublicUuid"
                                },
                                "kind": {
                                  "type": "string",
                                  "const": "oauth_access_token"
                                },
                                "scopes": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "context:read",
                                      "project:write",
                                      "organization:read",
                                      "organization:write",
                                      "billing:read",
                                      "profile:read",
                                      "profile:write",
                                      "observability:read",
                                      "observability:write",
                                      "evaluation:read",
                                      "evaluation:write",
                                      "configuration:read",
                                      "configuration:write",
                                      "sharing:read",
                                      "sharing:write",
                                      "access:read",
                                      "access:write"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "kind",
                                "scopes"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "actor",
                            "authorizationModelVersion",
                            "context",
                            "credential"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string",
                      "pattern": "^req_[a-f0-9]{32}$"
                    },
                    "success": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "data",
                    "requestId",
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid public API request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem400"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid public API credential",
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/PublicApiWwwAuthenticate"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse401"
                }
              }
            }
          },
          "403": {
            "description": "Public API request is not authorized",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse403"
                }
              }
            }
          },
          "404": {
            "description": "Public API resource not found",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse404"
                }
              }
            }
          },
          "409": {
            "description": "Public API request conflict",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse409"
                }
              }
            }
          },
          "413": {
            "description": "Public API request body too large",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse413"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported public API request body",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse415"
                }
              }
            }
          },
          "429": {
            "description": "Public API rate limit exceeded",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiRateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiRateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/PublicApiRateLimitReset"
              },
              "X-NeatLogs-RateLimit-Degraded": {
                "$ref": "#/components/headers/PublicApiRateLimitDegraded"
              },
              "X-NeatLogs-RateLimit-Limit": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitLimit"
              },
              "X-NeatLogs-RateLimit-Policy": {
                "$ref": "#/components/headers/PublicApiRateLimitPolicy"
              },
              "X-NeatLogs-RateLimit-Remaining": {
                "$ref": "#/components/headers/PublicApiLegacyRateLimitRemaining"
              },
              "X-NeatLogs-RateLimit-Reset-After": {
                "$ref": "#/components/headers/PublicApiRateLimitResetAfter"
              },
              "X-NeatLogs-RateLimit-Version": {
                "$ref": "#/components/headers/PublicApiRateLimitVersion"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse429"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiProblemResponse500"
                }
              }
            }
          },
          "503": {
            "description": "Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/PublicApiRetryAfter"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/PublicApiRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PublicApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/PublicApiProblem503"
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "Backend is draining"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "security": [
          {
            "PublicApiKeyAuth": []
          },
          {
            "PublicApiLegacyBearerAuth": []
          },
          {
            "ServiceAccountBearerAuth": []
          },
          {
            "OAuth2": [
              "context:read"
            ]
          }
        ],
        "x-neatlogs-operation-gate": "always",
        "x-contract-coverage": "contracted",
        "parameters": [
          {
            "name": "x-project-id",
            "in": "header",
            "required": false,
            "schema": {
              "description": "Required for service-account and OAuth credentials; optional for legacy keys",
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "description": "x-project-id header parameter"
          }
        ]
      }
    }
  }
}
