{
  "openapi": "3.1.0",
  "info": {
    "title": "Brello Public API",
    "version": "1.0.0-beta.3",
    "description": "Public SDK ingestion, scoped read endpoints, and outgoing signed webhooks. Read spend is SDK estimated cost; it is not a complete provider invoice. SDK content is not collected."
  },
  "servers": [
    {
      "url": "https://api.brello.app/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "projectKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "brl_live_ / brl_test_ (legacy brello_ accepted)"
      },
      "publicApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "brl_read_<43 Base64URL characters>"
      }
    },
    "schemas": {
      "ReportReadyWebhook": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "event": {
            "type": "string",
            "enum": ["report.ready"]
          },
          "data": {
            "$ref": "#/components/schemas/WeeklyReport"
          }
        },
        "required": ["eventId", "occurredAt", "event", "data"]
      },
      "WeeklyReport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "projectId": {
            "type": "string",
            "format": "uuid"
          },
          "period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              },
              "timeZone": {
                "type": "string",
                "enum": ["UTC"]
              },
              "endExclusive": {
                "type": "boolean",
                "enum": [true]
              }
            },
            "required": ["from", "to", "timeZone", "endExclusive"]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "total": {
            "$ref": "#/components/schemas/PublicCostSummary"
          },
          "summary": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "pdfUrl": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "projectId",
          "period",
          "createdAt",
          "total",
          "summary",
          "url",
          "pdfUrl"
        ]
      },
      "PublicCostSummary": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "enum": ["USD"]
          },
          "costSource": {
            "type": "string",
            "enum": ["sdk_estimate"]
          },
          "requestCount": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "knownEstimatedCostMicros": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "estimatedCostMicros": {
            "type": ["string", "null"],
            "pattern": "^\\d+$"
          },
          "unpricedRequestCount": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "currency",
          "costSource",
          "requestCount",
          "knownEstimatedCostMicros",
          "estimatedCostMicros",
          "unpricedRequestCount"
        ]
      },
      "AbuseAlertWebhook": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "event": {
            "type": "string",
            "enum": ["alert.abuse"]
          },
          "data": {
            "type": "object",
            "properties": {
              "projectId": {
                "type": "string",
                "format": "uuid"
              },
              "alertId": {
                "type": "string",
                "format": "uuid"
              },
              "endUserId": {
                "type": "string",
                "format": "uuid"
              },
              "externalUserId": {
                "type": ["string", "null"]
              },
              "rule": {
                "type": "string",
                "enum": ["median", "limit"]
              },
              "currency": {
                "type": "string",
                "enum": ["USD"]
              },
              "amountMicros": {
                "type": "string",
                "pattern": "^\\d+$"
              },
              "thresholdMicros": {
                "type": "string",
                "pattern": "^\\d+$"
              },
              "period": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date"
                  },
                  "to": {
                    "type": "string",
                    "format": "date"
                  },
                  "timeZone": {
                    "type": "string",
                    "enum": ["UTC"]
                  },
                  "endExclusive": {
                    "type": "boolean",
                    "enum": [true]
                  }
                },
                "required": ["from", "to", "timeZone", "endExclusive"]
              }
            },
            "required": [
              "projectId",
              "alertId",
              "endUserId",
              "externalUserId",
              "rule",
              "currency",
              "amountMicros",
              "thresholdMicros",
              "period"
            ]
          }
        },
        "required": ["eventId", "occurredAt", "event", "data"]
      },
      "ModelChangeWebhook": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "event": {
            "type": "string",
            "enum": ["alert.model_change"]
          },
          "data": {
            "type": "object",
            "properties": {
              "projectId": {
                "type": "string",
                "format": "uuid"
              },
              "changeId": {
                "type": "string",
                "format": "uuid"
              },
              "provider": {
                "type": "string"
              },
              "changeType": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "sourceUrl": {
                "type": ["string", "null"]
              },
              "effectiveAt": {
                "type": ["string", "null"]
              },
              "modelIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "affectedRequestCount": {
                "type": "string",
                "pattern": "^\\d+$"
              },
              "knownEstimatedCostMicros": {
                "type": "string",
                "pattern": "^\\d+$"
              },
              "unpricedRequestCount": {
                "type": "string",
                "pattern": "^\\d+$"
              }
            },
            "required": [
              "projectId",
              "changeId",
              "provider",
              "changeType",
              "title",
              "description",
              "sourceUrl",
              "effectiveAt",
              "modelIds",
              "affectedRequestCount",
              "knownEstimatedCostMicros",
              "unpricedRequestCount"
            ]
          }
        },
        "required": ["eventId", "occurredAt", "event", "data"]
      },
      "BatchReceipt": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "requestId": {
                "type": "string"
              },
              "receivedAt": {
                "type": "string",
                "format": "date-time"
              },
              "acceptedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rejectedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rejected": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RejectedEvent"
                }
              }
            },
            "required": [
              "requestId",
              "receivedAt",
              "acceptedCount",
              "rejectedCount",
              "rejected"
            ]
          }
        },
        "required": ["data"]
      },
      "RejectedEvent": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string",
            "enum": ["INVALID_EVENT", "EVENT_TOO_LARGE"]
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationIssue"
            }
          }
        },
        "required": ["index", "code", "issues"]
      },
      "ValidationIssue": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": ["path", "code"]
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "requestId": {
                "type": "string"
              }
            },
            "required": ["code", "message", "requestId"]
          }
        },
        "required": ["error"]
      },
      "EventBatch": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "string",
            "enum": ["1"]
          },
          "sdk": {
            "$ref": "#/components/schemas/SdkInfo"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LlmRequestEvent"
            },
            "minItems": 1,
            "maxItems": 50
          }
        },
        "required": ["schemaVersion", "sdk", "events"],
        "additionalProperties": false,
        "description": "Events are validated independently for partial acceptance. Body limits are UTF-8 bytes. Authenticated project and environment are never taken from this payload."
      },
      "SdkInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "runtime": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": ["name", "version"],
        "additionalProperties": false
      },
      "LlmRequestEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": ["llm.request"]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "provider": {
            "type": "string",
            "enum": [
              "openai",
              "anthropic",
              "google_ai_studio",
              "google_vertex_ai"
            ]
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "status": {
            "type": "string",
            "enum": ["success", "error", "cancelled"]
          },
          "providerKey": {
            "$ref": "#/components/schemas/ProviderKeyReference"
          },
          "providerRequestId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "logicalRequestId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "feature": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "endUser": {
            "$ref": "#/components/schemas/EndUserReference"
          },
          "usage": {
            "$ref": "#/components/schemas/TokenUsage"
          },
          "billing": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": ["standard", "batch", "unknown"]
              },
              "serviceTier": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              }
            },
            "additionalProperties": false
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "httpStatus": {
                "type": "integer",
                "minimum": 100,
                "maximum": 599
              }
            },
            "additionalProperties": false
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 256
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          }
        },
        "required": [
          "id",
          "type",
          "occurredAt",
          "durationMs",
          "provider",
          "model",
          "status",
          "usage"
        ],
        "additionalProperties": false,
        "description": "One completed provider attempt. Delivery retries reuse the event UUID; a new provider attempt gets a new UUID. Content is not collected in beta. Unknown fields are rejected; legacy content/prompt/completion/messages fields are discarded before validation."
      },
      "ProviderKeyReference": {
        "type": "object",
        "properties": {
          "fingerprint": {
            "type": "object",
            "properties": {
              "algorithm": {
                "type": "string",
                "enum": ["sha256"]
              },
              "value": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": ["algorithm", "value"],
            "additionalProperties": false
          },
          "hint": {
            "type": "object",
            "properties": {
              "format": {
                "type": "string",
                "enum": ["openai-redacted-v1", "anthropic-redacted-v1"]
              },
              "value": {
                "type": "string",
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_-]{3,32}(?:\\.\\.\\.|…)[A-Za-z0-9_-]{3,12}$"
              }
            },
            "required": ["format", "value"],
            "additionalProperties": false
          }
        },
        "required": ["fingerprint"],
        "additionalProperties": false,
        "description": "SHA-256 fingerprint of the provider secret, never the secret itself. A redacted hint is optional and is only a heuristic matching signal."
      },
      "EndUserReference": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/IdentifiedEndUserReference"
          },
          {
            "$ref": "#/components/schemas/HashedEndUserReference"
          }
        ]
      },
      "IdentifiedEndUserReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "plan": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,63}$",
            "description": "Project customer plan key. Send the explicit free or trial key when applicable."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "additionalProperties": false,
        "anyOf": [
          {
            "required": ["id"]
          },
          {
            "required": ["name"]
          }
        ],
        "description": "Application user ID and/or display name. IDs are project-scoped, case-sensitive and not trimmed. Names alone form a separate identity namespace and are not automatically merged with IDs."
      },
      "HashedEndUserReference": {
        "type": "object",
        "properties": {
          "idHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "algorithm": {
            "type": "string",
            "enum": ["hmac-sha256"]
          },
          "keyVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          }
        },
        "required": ["idHash", "algorithm", "keyVersion"],
        "additionalProperties": false,
        "description": "Legacy project-scoped HMAC identity. It is kept separate from supplied IDs and names."
      },
      "TokenUsage": {
        "type": ["object", "null"],
        "properties": {
          "inputTokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Total input tokens, including cache reads and cache creation."
          },
          "outputTokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "Total billable output tokens; reasoning tokens must not be added again."
          },
          "cacheReadInputTokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cacheCreationInputTokens": {
            "type": "object",
            "properties": {
              "fiveMinutes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "oneHour": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "additionalProperties": false
          }
        },
        "required": ["inputTokens", "outputTokens"],
        "additionalProperties": false,
        "description": "Null means unknown usage, never zero cost."
      },
      "SdkConfig": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "string",
                "enum": ["1"]
              },
              "configVersion": {
                "type": "string"
              },
              "serverTime": {
                "type": "string",
                "format": "date-time"
              },
              "refreshAfterSeconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "project": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "environment": {
                    "type": "string",
                    "enum": ["live", "test"]
                  }
                },
                "required": ["id", "environment"]
              },
              "collection": {
                "type": "object",
                "properties": {
                  "eventsEnabled": {
                    "type": "boolean"
                  },
                  "attributesEnabled": {
                    "type": "boolean"
                  },
                  "endUserIdEnabled": {
                    "type": "boolean"
                  },
                  "contentCollectionSupported": {
                    "type": "boolean",
                    "enum": [false]
                  }
                },
                "required": [
                  "eventsEnabled",
                  "attributesEnabled",
                  "endUserIdEnabled",
                  "contentCollectionSupported"
                ]
              },
              "transport": {
                "type": "object",
                "properties": {
                  "maxBatchEvents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "maxBatchBytes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "maxEventBytes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["maxBatchEvents", "maxBatchBytes", "maxEventBytes"]
              },
              "identity": {
                "type": "object",
                "properties": {
                  "endUser": {
                    "type": ["object", "null"],
                    "properties": {
                      "algorithm": {
                        "type": "string",
                        "enum": ["hmac-sha256"]
                      },
                      "secretEncoding": {
                        "type": "string",
                        "enum": ["base64url"]
                      },
                      "keyVersion": {
                        "type": "string"
                      },
                      "secret": {
                        "type": "string"
                      },
                      "domain": {
                        "type": "string",
                        "enum": ["brello:end-user:v1"]
                      }
                    },
                    "required": [
                      "algorithm",
                      "secretEncoding",
                      "keyVersion",
                      "secret",
                      "domain"
                    ]
                  }
                },
                "required": ["endUser"]
              }
            },
            "required": [
              "schemaVersion",
              "configVersion",
              "serverTime",
              "refreshAfterSeconds",
              "project",
              "collection",
              "transport",
              "identity"
            ]
          }
        },
        "required": ["data"]
      },
      "PublicApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "requestId": {
                "type": "string"
              }
            },
            "required": ["code", "message", "requestId"]
          }
        },
        "required": ["error"]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/events": {
      "post": {
        "operationId": "sendEvents",
        "tags": ["Events"],
        "security": [
          {
            "projectKey": []
          }
        ],
        "summary": "Accept a batch of SDK events",
        "description": "One provider attempt per event. Validation is per item; 202 means all valid items were acknowledged by the durable queue, not processed or billed. Retries reuse event UUIDs. Monthly quotas are approximate in beta. Content is discarded before publication. End users may supply a project-scoped ID/name or a legacy HMAC reference. Provider secrets are never accepted.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventBatch"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Valid events durably accepted; inspect rejected for invalid items. Consumers deduplicate events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchReceipt"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON, batch envelope, or schema version. Do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked project key. Stop sending and warn once.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Split the batch. A single oversized event must be reduced or discarded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "415": {
            "description": "Only uncompressed application/json is supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "No valid events. Inspect rejected and do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchReceipt"
                }
              }
            }
          },
          "429": {
            "description": "Request rate or asynchronous monthly quota exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds before retrying. The SDK must also enforce its own maximum buffer age."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Storage, identity, or admission unavailable. Retry with the same event UUIDs and bounded exponential backoff.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds before retrying. The SDK must also enforce its own maximum buffer age."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/config": {
      "get": {
        "operationId": "getConfig",
        "tags": ["Config"],
        "security": [
          {
            "projectKey": []
          }
        ],
        "summary": "Verify the project key and fetch effective SDK settings",
        "description": "Includes a project-scoped identity secret. Never log or persist this response in shared caches. Authentication success does not mean events have been received. Available independently of monthly event quota.",
        "responses": {
          "200": {
            "description": "Authenticated project and effective collection configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkConfig"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked project key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Config polling rate exceeded.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds before retrying. The SDK must also enforce its own maximum buffer age."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "SDK configuration temporarily unavailable.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "minimum": 1
                },
                "description": "Seconds before retrying. The SDK must also enforce its own maximum buffer age."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/spend": {
      "get": {
        "operationId": "getSpend",
        "tags": ["Spend"],
        "security": [
          {
            "publicApiKey": []
          }
        ],
        "summary": "Query SDK estimated spend",
        "description": "Requires spend:read. Filters are intersected. UTC dates use an exclusive end, at most 366 days apart. key groups and sdkKeyId refer to Brello ingestion keys. Retained daily totals are included with date and environment filters and have a null dimension when grouped by anything other than day. Filters by provider, model, key, end user, or feature use retained request details only. This is SDK estimated usage.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "required": false,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "required": false,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": ["all", "live", "test"],
              "default": "all"
            },
            "required": false,
            "name": "environment",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": ["openai", "anthropic"]
            },
            "required": false,
            "name": "provider",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "required": false,
            "name": "model",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "sdkKeyId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "endUserId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "required": false,
            "name": "providerKeyFingerprint",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": false,
            "name": "feature",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "model",
                "key",
                "providerKey",
                "endUser",
                "feature",
                "provider"
              ],
              "default": "day"
            },
            "required": false,
            "name": "groupBy",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": ["integer", "null"],
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            },
            "required": false,
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Estimated spend. A null total means some requests could not be priced.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date"
                            },
                            "to": {
                              "type": "string",
                              "format": "date"
                            },
                            "timeZone": {
                              "type": "string",
                              "enum": ["UTC"]
                            },
                            "endExclusive": {
                              "type": "boolean",
                              "enum": [true]
                            }
                          },
                          "required": ["from", "to", "timeZone", "endExclusive"]
                        },
                        "environment": {
                          "type": "string",
                          "enum": ["all", "live", "test"]
                        },
                        "groupBy": {
                          "type": "string",
                          "enum": [
                            "day",
                            "model",
                            "key",
                            "providerKey",
                            "endUser",
                            "feature",
                            "provider"
                          ],
                          "default": "day"
                        },
                        "total": {
                          "$ref": "#/components/schemas/PublicCostSummary"
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/PublicCostSummary"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "dimension": {
                                    "type": ["string", "null"]
                                  }
                                },
                                "required": ["dimension"]
                              }
                            ]
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number"
                            },
                            "offset": {
                              "type": "number"
                            },
                            "hasMore": {
                              "type": "boolean"
                            }
                          },
                          "required": ["limit", "offset", "hasMore"]
                        }
                      },
                      "required": [
                        "projectId",
                        "period",
                        "environment",
                        "total",
                        "groups",
                        "pagination"
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or JSON. Fix the request before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired, revoked, or suspended-issuer API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "403": {
            "description": "The API key does not contain the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in the authenticated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 16,384 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the indicated number of seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with bounded backoff.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          }
        }
      }
    },
    "/end-users": {
      "get": {
        "operationId": "listEndUsers",
        "tags": ["End users"],
        "security": [
          {
            "publicApiKey": []
          }
        ],
        "summary": "List end users with usage in a period",
        "description": "Requires end_users:read. endUserId is the internal Brello UUID; externalId is the supplied application ID. Only users with matching SDK activity are returned. Ordered by internal UUID.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "required": false,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date"
            },
            "required": false,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": ["all", "live", "test"],
              "default": "all"
            },
            "required": false,
            "name": "environment",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": ["openai", "anthropic"]
            },
            "required": false,
            "name": "provider",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "required": false,
            "name": "model",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "sdkKeyId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "endUserId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "required": false,
            "name": "providerKeyFingerprint",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": false,
            "name": "feature",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": ["integer", "null"],
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            },
            "required": false,
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A project-scoped page of end users.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "period": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "format": "date"
                            },
                            "to": {
                              "type": "string",
                              "format": "date"
                            },
                            "timeZone": {
                              "type": "string",
                              "enum": ["UTC"]
                            },
                            "endExclusive": {
                              "type": "boolean",
                              "enum": [true]
                            }
                          },
                          "required": ["from", "to", "timeZone", "endExclusive"]
                        },
                        "environment": {
                          "type": "string",
                          "enum": ["all", "live", "test"]
                        },
                        "users": {
                          "type": "array",
                          "items": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/PublicCostSummary"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "externalId": {
                                    "type": ["string", "null"]
                                  },
                                  "name": {
                                    "type": ["string", "null"]
                                  },
                                  "identityKind": {
                                    "type": "string",
                                    "enum": ["id", "name", "hash"]
                                  }
                                },
                                "required": [
                                  "id",
                                  "externalId",
                                  "name",
                                  "identityKind"
                                ]
                              }
                            ]
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number"
                            },
                            "offset": {
                              "type": "number"
                            },
                            "hasMore": {
                              "type": "boolean"
                            }
                          },
                          "required": ["limit", "offset", "hasMore"]
                        }
                      },
                      "required": [
                        "projectId",
                        "period",
                        "environment",
                        "users",
                        "pagination"
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or JSON. Fix the request before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired, revoked, or suspended-issuer API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "403": {
            "description": "The API key does not contain the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in the authenticated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 16,384 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the indicated number of seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with bounded backoff.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          }
        }
      }
    },
    "/reports": {
      "get": {
        "operationId": "listReports",
        "tags": ["Reports"],
        "security": [
          {
            "publicApiKey": []
          }
        ],
        "summary": "List archived weekly reports",
        "description": "Requires reports:read. Immutable completed UTC week snapshots, newest first. Reports include live SDK events and explicitly expose unpriced requests; they do not represent final provider invoices.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": ["integer", "null"],
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            },
            "required": false,
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A report archive page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "reports": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WeeklyReport"
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "limit": {
                              "type": "number"
                            },
                            "offset": {
                              "type": "number"
                            },
                            "hasMore": {
                              "type": "boolean"
                            }
                          },
                          "required": ["limit", "offset", "hasMore"]
                        }
                      },
                      "required": ["reports", "pagination"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or JSON. Fix the request before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired, revoked, or suspended-issuer API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "403": {
            "description": "The API key does not contain the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in the authenticated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 16,384 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the indicated number of seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with bounded backoff.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          }
        }
      }
    },
    "/reports/latest": {
      "get": {
        "operationId": "getLatestReport",
        "tags": ["Reports"],
        "security": [
          {
            "publicApiKey": []
          }
        ],
        "summary": "Get the latest completed report",
        "responses": {
          "200": {
            "description": "Latest report; requires reports:read. Returns 404 until a snapshot is generated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WeeklyReport"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or JSON. Fix the request before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired, revoked, or suspended-issuer API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "403": {
            "description": "The API key does not contain the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in the authenticated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 16,384 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the indicated number of seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with bounded backoff.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          }
        }
      }
    },
    "/reports/{reportId}": {
      "get": {
        "operationId": "getReport",
        "tags": ["Reports"],
        "security": [
          {
            "publicApiKey": []
          }
        ],
        "summary": "Get an archived report",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "reportId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "A report belonging to the key's project; requires reports:read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WeeklyReport"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or JSON. Fix the request before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired, revoked, or suspended-issuer API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "403": {
            "description": "The API key does not contain the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in the authenticated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 16,384 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the indicated number of seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with bounded backoff.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          }
        }
      }
    },
    "/reports/{reportId}/pdf": {
      "get": {
        "operationId": "downloadReportPdf",
        "tags": ["Reports"],
        "security": [
          {
            "publicApiKey": []
          }
        ],
        "summary": "Download a report PDF",
        "description": "Requires reports:read. Returns a one-page text PDF generated from the immutable snapshot. Download links require the same Bearer authentication; they are not public sharing links.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "reportId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Report PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters or JSON. Fix the request before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired, revoked, or suspended-issuer API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "403": {
            "description": "The API key does not contain the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found in the authenticated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds 16,384 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Retry after the indicated number of seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with bounded backoff.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "report.ready": {
      "post": {
        "operationId": "report_ready",
        "tags": ["Webhook events"],
        "summary": "report.ready",
        "description": "Brello sends this request to subscribed HTTPS destinations. Verify HMAC-SHA256 using the destination secret over timestamp + '.' + the exact raw UTF-8 request body; the v1 signature is lowercase hex. Compare in constant time and reject timestamps more than 300 seconds from your clock. Deduplicate Brello-Event-Id. Return 2xx to acknowledge. Network errors, 429 and 5xx retry with exponential backoff (up to 8 attempts / 23 hours); other statuses fail permanently. Retry timestamps/signatures change; event ID and payload are stable. Subscriptions are opt-in and do not backfill old events.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "Brello-Event-Id",
            "in": "header"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true,
            "name": "Brello-Timestamp",
            "in": "header"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^v1=[a-f0-9]{64}$"
            },
            "required": true,
            "name": "Brello-Signature",
            "in": "header"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportReadyWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Receiver acknowledged the event."
          }
        }
      }
    },
    "alert.abuse": {
      "post": {
        "operationId": "alert_abuse",
        "tags": ["Webhook events"],
        "summary": "alert.abuse",
        "description": "Brello sends this request to subscribed HTTPS destinations. Verify HMAC-SHA256 using the destination secret over timestamp + '.' + the exact raw UTF-8 request body; the v1 signature is lowercase hex. Compare in constant time and reject timestamps more than 300 seconds from your clock. Deduplicate Brello-Event-Id. Return 2xx to acknowledge. Network errors, 429 and 5xx retry with exponential backoff (up to 8 attempts / 23 hours); other statuses fail permanently. Retry timestamps/signatures change; event ID and payload are stable. Subscriptions are opt-in and do not backfill old events.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "Brello-Event-Id",
            "in": "header"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true,
            "name": "Brello-Timestamp",
            "in": "header"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^v1=[a-f0-9]{64}$"
            },
            "required": true,
            "name": "Brello-Signature",
            "in": "header"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AbuseAlertWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Receiver acknowledged the event."
          }
        }
      }
    },
    "alert.model_change": {
      "post": {
        "operationId": "alert_model_change",
        "tags": ["Webhook events"],
        "summary": "alert.model_change",
        "description": "Brello sends this request to subscribed HTTPS destinations. Verify HMAC-SHA256 using the destination secret over timestamp + '.' + the exact raw UTF-8 request body; the v1 signature is lowercase hex. Compare in constant time and reject timestamps more than 300 seconds from your clock. Deduplicate Brello-Event-Id. Return 2xx to acknowledge. Network errors, 429 and 5xx retry with exponential backoff (up to 8 attempts / 23 hours); other statuses fail permanently. Retry timestamps/signatures change; event ID and payload are stable. Subscriptions are opt-in and do not backfill old events.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "Brello-Event-Id",
            "in": "header"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true,
            "name": "Brello-Timestamp",
            "in": "header"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^v1=[a-f0-9]{64}$"
            },
            "required": true,
            "name": "Brello-Signature",
            "in": "header"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelChangeWebhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Receiver acknowledged the event."
          }
        }
      }
    }
  }
}
